Changeset 328 in ProjectBuilder
- Timestamp:
- Feb 22, 2008, 12:00:13 PM (17 years ago)
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r327 r328 229 229 230 230 # Get project info on authors and log file 231 my $chglog = "$ENV{'PB CONF'}/$pbpkg/pbcl";232 $chglog = "$ENV{'PB CONF'}/pbcl" if (! -f $chglog);231 my $chglog = "$ENV{'PBROOT'}/$pbpkg/pbcl"; 232 $chglog = "$ENV{'PBROOT'}/pbcl" if (! -f $chglog); 233 233 $chglog = undef if (! -f $chglog); 234 234 235 my $authors = "$ENV{'PB CONF'}/$pbpkg/pbauthors";236 $authors = "$ENV{'PB CONF'}/pbauthors" if (! -f $authors);235 my $authors = "$ENV{'PBROOT'}/$pbpkg/pbauthors"; 236 $authors = "$ENV{'PBROOT'}/pbauthors" if (! -f $authors); 237 237 $authors = "/dev/null" if (! -f $authors); 238 238 … … 242 242 copy($chglog,"$dest/NEWS") || die "Unable to create $dest/NEWS"; 243 243 } 244 pb_cms_log($scheme, $dir,$dest,$chglog,$authors);244 pb_cms_log($scheme,"$ENV{'PBDIR'}/$pbprojver/$dir",$dest,$chglog,$authors); 245 245 246 246 my %build; 247 247 248 my ($ptr) = pb_conf_get_if("vmlist","velist"); 249 foreach my $d (split(/,/,$ptr->{$ENV{'PBPROJ'}})) { 248 my @pt; 249 @pt = pb_conf_get_if("vmlist","velist"); 250 foreach my $d (split(/,/,$pt[0]->{$ENV{'PBPROJ'}}),split(/,/,$pt[1]->{$ENV{'PBPROJ'}})) { 250 251 my ($name,$ver,$arch) = split(/-/,$d); 251 252 chomp($arch); … … 261 262 my %bfiles = (); 262 263 my %pkgfiles = (); 263 pb_log(2,"DEBUG dir: $ENV{'PBCONF'}/$pbpkg\n");264 264 $build{"$ddir-$dver"} = "yes"; 265 265 -
devel/pb/lib/ProjectBuilder/Base.pm
r327 r328 18 18 use POSIX qw(strftime); 19 19 use Time::localtime qw(localtime); 20 21 use ProjectBuilder::Changelog qw (pb_changelog);20 use Date::Manip; 21 use English; 22 22 23 23 # Inherit from the "Exporter" module which handles exporting functions. … … 889 889 if (not defined $p2) { 890 890 # No ref in CMS project conf file so use the home dir one. 891 $p1->{$ENV{'PBPROJ'}} = $p1->{'default'} if ( not defined $p1->{$ENV{'PBPROJ'}});891 $p1->{$ENV{'PBPROJ'}} = $p1->{'default'} if ((not defined $p1->{$ENV{'PBPROJ'}}) && (defined $p1->{'default'})); 892 892 } else { 893 893 # Ref found in CMS project conf file 894 894 if (not defined $p1) { 895 895 # No ref in home dir project conf file so use the CMS one. 896 $p2->{$ENV{'PBPROJ'}} = $p2->{'default'} if ( not defined $p2->{$ENV{'PBPROJ'}});896 $p2->{$ENV{'PBPROJ'}} = $p2->{'default'} if ((not defined $p2->{$ENV{'PBPROJ'}}) && (defined $p2->{'default'})); 897 897 $p1 = $p2; 898 898 } else { … … 906 906 if (not defined $p1->{$ENV{'PBPROJ'}}) { 907 907 if (defined $p2->{$ENV{'PBPROJ'}}) { 908 $p1->{$ENV{'PBPROJ'}} = $p2->{$ENV{'PBPROJ'}} ;908 $p1->{$ENV{'PBPROJ'}} = $p2->{$ENV{'PBPROJ'}} if (defined $p2->{$ENV{'PBPROJ'}}); 909 909 } else { 910 $p1->{$ENV{'PBPROJ'}} = $p1->{'default'} ;910 $p1->{$ENV{'PBPROJ'}} = $p1->{'default'} if (defined $p1->{'default'}); 911 911 } 912 912 } … … 1544 1544 } 1545 1545 1546 sub pb_changelog { 1547 1548 my $dtype = shift; 1549 my $pkg = shift; 1550 my $pbver = shift; 1551 my $pbtag = shift; 1552 my $dsuf = shift; 1553 my $path = shift; 1554 my $OUTPUT = shift; 1555 my $doit = shift; 1556 my $chglog = shift || undef; 1557 1558 my $log = ""; 1559 1560 # For date handling 1561 $ENV{LANG}="C"; 1562 1563 if ((not (defined $dtype)) || ($dtype eq "") || 1564 (not (defined $pkg)) || ($pkg eq "") || 1565 (not (defined $pbver)) || ($pbver eq "") || 1566 (not (defined $pbtag)) || ($pbtag eq "") || 1567 (not (defined $dsuf)) || ($dsuf eq "") || 1568 (not (defined $path)) || ($path eq "") || 1569 (not (defined $OUTPUT)) || ($OUTPUT eq "") || 1570 (not (defined $doit)) || ($doit eq "")) { 1571 print $OUTPUT "\n"; 1572 return; 1573 } 1574 1575 if (((not defined $chglog) || (! -f $chglog)) && ($doit eq "yes")) { 1576 #pb_log(2,"No ChangeLog file ($chglog) for $pkg\n"; 1577 print $OUTPUT "\n"; 1578 return; 1579 } 1580 1581 my $date; 1582 my $ndate; 1583 my $n2date; 1584 my $ver; 1585 my $ver2; 1586 my ($packager) = pb_conf_get("pbpackager"); 1587 1588 # If we don't need to do it, or don't have it fake something 1589 if (((not defined $chglog) || (! -f $chglog)) && ($doit ne "yes")) { 1590 my @date=(localtime->sec(), localtime->min(), localtime->hour(), localtime->mday(), localtime->mon(), localtime->year(), localtime->wday(), localtime->yday(), localtime->isdst()); 1591 $date = strftime("%Y-%m-%d", @date); 1592 $ndate = UnixDate($date,"%a", "%b", "%d", "%Y"); 1593 $n2date = &UnixDate($date,"%a, %d %b %Y %H:%M:%S %z"); 1594 if (($dtype eq "rpm") || ($dtype eq "fc")) { 1595 $ver2 = "$pbver-$pbtag$dsuf"; 1596 print $OUTPUT "* $ndate $packager->{$ENV{'PBPROJ'}} $ver2\n"; 1597 print $OUTPUT "- Updated to $pbver\n"; 1598 } 1599 if ($dtype eq "deb") { 1600 print $OUTPUT "$pkg ($pbver) unstable; urgency=low\n"; 1601 print $OUTPUT "\n"; 1602 print $OUTPUT " -- $packager->{$ENV{'PBPROJ'}} $n2date\n\n\n"; 1603 } 1604 return; 1605 } 1606 1607 open(INPUT,"$chglog") || die "Unable to open $chglog (read)"; 1608 1609 # Skip first 4 lines 1610 my $tmp = <INPUT>; 1611 $tmp = <INPUT>; 1612 $tmp = <INPUT>; 1613 if ($dtype eq "announce") { 1614 print $OUTPUT $tmp; 1615 } 1616 $tmp = <INPUT>; 1617 if ($dtype eq "announce") { 1618 print $OUTPUT $tmp; 1619 } 1620 1621 my $first=1; 1622 1623 # Handle each block separated by newline 1624 while (<INPUT>) { 1625 ($ver, $date) = split(/ /); 1626 $ver =~ s/^v//; 1627 chomp($date); 1628 $date =~ s/\(([0-9-]+)\)/$1/; 1629 #pb_log(2,"**$date**\n"; 1630 $ndate = UnixDate($date,"%a", "%b", "%d", "%Y"); 1631 $n2date = &UnixDate($date,"%a, %d %b %Y %H:%M:%S %z"); 1632 #pb_log(2,"**$ndate**\n"; 1633 1634 if (($dtype eq "rpm") || ($dtype eq "fc")) { 1635 if ($ver !~ /-/) { 1636 if ($first eq 1) { 1637 $ver2 = "$ver-$pbtag$dsuf"; 1638 $first=0; 1639 } else { 1640 $ver2 = "$ver-1$dsuf"; 1641 } 1642 } else { 1643 $ver2 = "$ver$dsuf"; 1644 } 1645 print $OUTPUT "* $ndate $packager->{$ENV{'PBPROJ'}} $ver2\n"; 1646 print $OUTPUT "- Updated to $ver\n"; 1647 } 1648 if ($dtype eq "deb") { 1649 print $OUTPUT "$pkg ($ver) unstable; urgency=low\n"; 1650 print $OUTPUT "\n"; 1651 } 1652 1653 $tmp = <INPUT>; 1654 while ($tmp !~ /^$/) { 1655 if ($dtype eq "deb") { 1656 $tmp =~ s/^- //; 1657 print $OUTPUT " * $tmp"; 1658 } elsif ($dtype eq "rpm") { 1659 print $OUTPUT "$tmp"; 1660 } else { 1661 print $OUTPUT "$tmp"; 1662 } 1663 last if (eof(INPUT)); 1664 $tmp = <INPUT>; 1665 } 1666 print $OUTPUT "\n"; 1667 1668 if ($dtype eq "deb") { 1669 # Cf: http://www.debian.org/doc/debian-policy/ch-source.html#s-dpkgchangelog 1670 print $OUTPUT " -- $packager->{$ENV{'PBPROJ'}} $n2date\n\n\n"; 1671 } 1672 1673 last if (eof(INPUT)); 1674 last if ($dtype eq "announce"); 1675 } 1676 close(INPUT); 1677 } 1546 1678 1; -
pbconf/devel/pb.pb
r327 r328 32 32 # a QEMU rhel_3 here means that the VM will be named rhel_3.qemu 33 33 # 34 vmlist collectl= mandrake-10.1-i386,mandrake-10.2-i386,mandriva-2006.0-i386,mandriva-2007.0-i386,mandriva-2007.1-i386,mandriva-2008.0-i386,redhat-7.3-i386,redhat-9-i386,fedora-4-i386,fedora-5-i386,fedora-6-i386,rhel-3-i386,rhel-4-i386,rhel-5-i386,suse-10.0-i386,suse-10.1-i386,suse-10.2-i386,suse-10.3-i386,sles-9-i386,sles-10-i386,gentoo-nover-i386,debian-3.1-i386,debian-4.0-i386,ubuntu-6.06-i386,ubuntu-7.04-i386,ubuntu-7.10-i386,mandriva-2007.0-x86_64,mandriva-2007.1-x86_64,mandriva-2008.0-x86_64,fedora-6-x86_64,fedora-8-x86_64,rhel-4-x86_64,rhel-5-x86_64,suse-10.2-x86_64,suse-10.3-x86_64,sles-10-x86_64,gentoo-nover-x86_64,debian-4.0-x86_64,ubuntu-7.04-x86_64,ubuntu-7.10-x86_6434 vmlist pb = mandrake-10.1-i386,mandrake-10.2-i386,mandriva-2006.0-i386,mandriva-2007.0-i386,mandriva-2007.1-i386,mandriva-2008.0-i386,redhat-7.3-i386,redhat-9-i386,fedora-4-i386,fedora-5-i386,fedora-6-i386,rhel-3-i386,rhel-4-i386,rhel-5-i386,suse-10.0-i386,suse-10.1-i386,suse-10.2-i386,suse-10.3-i386,sles-9-i386,sles-10-i386,gentoo-nover-i386,debian-3.1-i386,debian-4.0-i386,ubuntu-6.06-i386,ubuntu-7.04-i386,ubuntu-7.10-i386,mandriva-2007.0-x86_64,mandriva-2007.1-x86_64,mandriva-2008.0-x86_64,fedora-6-x86_64,fedora-8-x86_64,rhel-4-x86_64,rhel-5-x86_64,suse-10.2-x86_64,suse-10.3-x86_64,sles-10-x86_64,gentoo-nover-x86_64,debian-4.0-x86_64,ubuntu-7.04-x86_64,ubuntu-7.10-x86_64 35 35 36 36 velist pb = fedora-7-i386
Note:
See TracChangeset
for help on using the changeset viewer.