Changeset 448 in ProjectBuilder for devel/pb/lib/ProjectBuilder/CMS.pm


Ignore:
Timestamp:
May 26, 2008, 10:41:45 AM (16 years ago)
Author:
Bruno Cornec
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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.