Changeset 448


Ignore:
Timestamp:
May 26, 2008, 10:41:45 AM (11 years ago)
Author:
bruno
Message:
  • Fake Changelog for test version
  • setupvm improved with init level 3 by default
  • still issue for pb on Debian with the devel version name, and the mixed cases for modules unallowed
Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r444 r448  
    488488        my $chglog;
    489489
    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);
    518505
    519506        my %build;
     
    697684            symlink "pbconf/$ddir-$dver","debian" || die "Unable to symlink to pbconf/$ddir-$dver";
    698685            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            }
    699690            pb_system("dpkg-buildpackage -us -uc -rfakeroot","Building package");
    700691            $made="$made $pbpkg"."_*.deb $pbpkg"."_*.dsc $pbpkg"."_*.tar.gz";
     
    15101501chmod 0640,$file;
    15111502
     1503# Keep the VM in text mode
     1504$file="/etc/inittab";
     1505open(PBFILE,$file) || die "Unable to open $file";
     1506open(PBOUT,"> $file.new") || die "Unable to open $file.new";
     1507while (<PBFILE>) {
     1508    s/^(..):5:initdefault:$/$1:3:initdefault:/;
     1509    print PBOUT $_;
     1510}
     1511close(PBFILE);
     1512close(PBOUT);
     1513rename("$file.new",$file);
     1514chmod 0640,$file;
     1515
    15121516# pb has to be added to portage group on gentoo
    15131517
  • devel/pb/lib/ProjectBuilder/CMS.pm

    r415 r448  
    552552my $chglog = shift;
    553553my $authors = shift;
     554my $testver = shift || undef;
    554555
    555556pb_cms_create_authors($authors,$dest,$scheme);
    556557
    557 if ($scheme =~ /^svn/) {
     558if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) {
    558559    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
     577if ($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);
    559582        if (-x "/usr/bin/svn2cl") {
    560             # In case we have no network, just create an empty one before to allow correct build
    561             open(CL,"> $dest/ChangeLog") || die "Unable to create $dest/ChangeLog";
    562             close(CL);
    563583            pb_system("/usr/bin/svn2cl --group-by-day --authors=$authors -i -o $dest/ChangeLog $pkgdir","Generating ChangeLog from SVN with svn2cl");
    564584        } else {
     
    575595    # CVS needs a relative path !
    576596    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);
    577600        if (-x "/usr/bin/cvs2cl") {
    578             # In case we have no network, just create an empty one before to allow correct build
    579             open(CL,"> $dest/ChangeLog") || die "Unable to create $dest/ChangeLog";
    580             close(CL);
    581601            pb_system("/usr/bin/cvs2cl --group-by-day -U $authors -f $dest/ChangeLog $pkgdir","Generating ChangeLog from CVS with cvs2cl");
    582602        } else {
Note: See TracChangeset for help on using the changeset viewer.