Changeset 448 in ProjectBuilder
- Timestamp:
- May 26, 2008, 10:41:45 AM (17 years ago)
- Location:
- devel/pb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r444 r448 488 488 my $chglog; 489 489 490 if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) { 491 if (! -f "$dest/NEWS") { 492 open(NEWS,"> $dest/NEWS") || die "Unable to create $dest/NEWS"; 493 close(NEWS); 494 } 495 open(CL,"> $dest/ChangeLog") || die "Unable to create $dest/ChangeLog"; 496 close(CL); 497 open(CL,"> $dest/$ENV{'PBCMSLOGFILE'}") || die "Unable to create $dest/$ENV{'PBCMSLOGFILE'}"; 498 close(CL); 499 $chglog = undef; 500 } else { 501 502 # Get project info on authors and log file 503 $chglog = "$ENV{'PBROOTDIR'}/$pbpkg/pbcl"; 504 $chglog = "$ENV{'PBROOTDIR'}/pbcl" if (! -f $chglog); 505 $chglog = undef if (! -f $chglog); 506 507 my $authors = "$ENV{'PBROOTDIR'}/$pbpkg/pbauthors"; 508 $authors = "$ENV{'PBROOTDIR'}/pbauthors" if (! -f $authors); 509 $authors = "/dev/null" if (! -f $authors); 510 511 # Extract cms log history and store it 512 if ((defined $chglog) && (! -f "$dest/NEWS")) { 513 pb_log(2,"Generating NEWS file from $chglog\n"); 514 copy($chglog,"$dest/NEWS") || die "Unable to create $dest/NEWS"; 515 } 516 pb_cms_log($scheme,"$ENV{'PBDIR'}/$dir",$dest,$chglog,$authors); 517 } 490 # Get project info on authors and log file 491 $chglog = "$ENV{'PBROOTDIR'}/$pbpkg/pbcl"; 492 $chglog = "$ENV{'PBROOTDIR'}/pbcl" if (! -f $chglog); 493 $chglog = undef if (! -f $chglog); 494 495 my $authors = "$ENV{'PBROOTDIR'}/$pbpkg/pbauthors"; 496 $authors = "$ENV{'PBROOTDIR'}/pbauthors" if (! -f $authors); 497 $authors = "/dev/null" if (! -f $authors); 498 499 # Extract cms log history and store it 500 if ((defined $chglog) && (! -f "$dest/NEWS")) { 501 pb_log(2,"Generating NEWS file from $chglog\n"); 502 copy($chglog,"$dest/NEWS") || die "Unable to create $dest/NEWS"; 503 } 504 pb_cms_log($scheme,"$ENV{'PBDIR'}/$dir",$dest,$chglog,$authors,$testver); 518 505 519 506 my %build; … … 697 684 symlink "pbconf/$ddir-$dver","debian" || die "Unable to symlink to pbconf/$ddir-$dver"; 698 685 chmod 0755,"debian/rules"; 686 if ($dver !~ /[0-9]/) { 687 # dpkg-deb doesn't accept non digit versions. removing checks 688 # dpkg-source checks upper case when generating perl modules 689 } 699 690 pb_system("dpkg-buildpackage -us -uc -rfakeroot","Building package"); 700 691 $made="$made $pbpkg"."_*.deb $pbpkg"."_*.dsc $pbpkg"."_*.tar.gz"; … … 1510 1501 chmod 0640,$file; 1511 1502 1503 # Keep the VM in text mode 1504 $file="/etc/inittab"; 1505 open(PBFILE,$file) || die "Unable to open $file"; 1506 open(PBOUT,"> $file.new") || die "Unable to open $file.new"; 1507 while (<PBFILE>) { 1508 s/^(..):5:initdefault:$/$1:3:initdefault:/; 1509 print PBOUT $_; 1510 } 1511 close(PBFILE); 1512 close(PBOUT); 1513 rename("$file.new",$file); 1514 chmod 0640,$file; 1515 1512 1516 # pb has to be added to portage group on gentoo 1513 1517 -
devel/pb/lib/ProjectBuilder/CMS.pm
r415 r448 552 552 my $chglog = shift; 553 553 my $authors = shift; 554 my $testver = shift || undef; 554 555 555 556 pb_cms_create_authors($authors,$dest,$scheme); 556 557 557 if ( $scheme =~ /^svn/) {558 if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) { 558 559 if (! -f "$dest/ChangeLog") { 560 open(CL,"> $dest/ChangeLog") || die "Unable to create $dest/ChangeLog"; 561 # We need a minimal version for debian type of build 562 print CL "\n"; 563 print CL "\n"; 564 print CL "\n"; 565 print CL "\n"; 566 print CL "1990-01-01 none\n"; 567 print CL "\n"; 568 print CL " * test version\n"; 569 print CL "\n"; 570 close(CL); 571 pb_log(0,"Generating fake ChangeLog for test version\n"); 572 open(CL,"> $dest/$ENV{'PBCMSLOGFILE'}") || die "Unable to create $dest/$ENV{'PBCMSLOGFILE'}"; 573 close(CL); 574 } 575 } 576 577 if ($scheme =~ /^svn/) { 578 if (! -f "$dest/ChangeLog") { 579 # In case we have no network, just create an empty one before to allow correct build 580 open(CL,"> $dest/ChangeLog") || die "Unable to create $dest/ChangeLog"; 581 close(CL); 559 582 if (-x "/usr/bin/svn2cl") { 560 # In case we have no network, just create an empty one before to allow correct build561 open(CL,"> $dest/ChangeLog") || die "Unable to create $dest/ChangeLog";562 close(CL);563 583 pb_system("/usr/bin/svn2cl --group-by-day --authors=$authors -i -o $dest/ChangeLog $pkgdir","Generating ChangeLog from SVN with svn2cl"); 564 584 } else { … … 575 595 # CVS needs a relative path ! 576 596 if (! -f "$dest/ChangeLog") { 597 # In case we have no network, just create an empty one before to allow correct build 598 open(CL,"> $dest/ChangeLog") || die "Unable to create $dest/ChangeLog"; 599 close(CL); 577 600 if (-x "/usr/bin/cvs2cl") { 578 # In case we have no network, just create an empty one before to allow correct build579 open(CL,"> $dest/ChangeLog") || die "Unable to create $dest/ChangeLog";580 close(CL);581 601 pb_system("/usr/bin/cvs2cl --group-by-day -U $authors -f $dest/ChangeLog $pkgdir","Generating ChangeLog from CVS with cvs2cl"); 582 602 } else {
Note:
See TracChangeset
for help on using the changeset viewer.