Changeset 1432 in ProjectBuilder


Ignore:
Timestamp:
Mar 12, 2012, 10:24:41 PM (12 years ago)
Author:
Bruno Cornec
Message:

r4556@localhost: bruno | 2012-03-08 22:31:12 +0100

  • Adds a new extdir member to the pb structure, in order to manage the timestamp tag added in version name for test versions and have a complete correspondance between the tar file content, and the names. Should fix #99. This modification creates an incompatibility in the build part of pb, so requires that the build environment be updated before it's usable (with setupve|vm or sbx2setupve|vm)
  • This patch has been tested with .rpm and .deb test packages successfully. ebuild and solaris are to be tested.
  • Use the new extdir member to update existing projects filter
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1426 r1432  
    791791    $delivery->{$ENV{'PBPROJ'}} = "" if (not defined $delivery->{$ENV{'PBPROJ'}});
    792792
     793    # If we deal with a test dir, we want to keep the date in tar file and dir name
     794    my $pbextdir = "";
     795        if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) {
     796            $pbextdir = strftime("%Y%m%d%H%M%S", @date);
     797    }
     798
    793799    foreach my $pbpkg (@pkgs) {
    794800        $ENV{'PBPKG'} = $pbpkg;
     
    799805            $pbver = $ENV{'PBPROJVER'};
    800806        }
    801         # If it's a test version, then tag == 0.date
     807        # If it's a test version, then tag == 0
    802808        if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) {
    803             $pbtag = "0.".strftime("%Y%m%d%H%M%S", @date);
     809            $pbtag = "0";
    804810            $ENV{'PBPROJTAG'} = $pbtag;
    805811        } elsif ((defined $pkgt) && (defined $pkgt->{$pbpkg})) {
     
    814820        die "Unable to get env var PBDESTDIR" if (not defined $ENV{'PBDESTDIR'});
    815821
    816         my $dest = "$ENV{'PBDESTDIR'}/$pbpkg-$pbver";
     822        my $dest = "$ENV{'PBDESTDIR'}/$pbpkg-$pbver$pbextdir";
    817823        # Create the structure if needed
    818824        pb_mkdir_p($dest);
     
    887893        $pb->{'extpkgdir'} = $extpkgdir;
    888894        $pb->{'chglog'} = $chglog;
     895        $pb->{'extdir'} = $pbextdir;
    889896        $pb->{'packager'} = $ENV{'PBPACKAGER'};
    890897        $pb->{'proj'} = $ENV{'PBPROJ'};
     
    11581165            # Maybe check basename of both to be sure they are the same ?
    11591166            pb_log(0,"Preserving original tar file ");
    1160             move("$preserve","$pbpkg-$pbver.tar.gz");
     1167            move("$preserve","$pbpkg-$pbver$pbextdir.tar.gz");
    11611168        } else {
    11621169            # Possibility to look at PBSRC to guess more the filename
    1163             pb_system("tar cfz $pbpkg-$pbver.tar.gz --exclude=$pbpkg-$pbver/pbconf $pbpkg-$pbver","Creating $pbpkg tar files compressed");
    1164         }
    1165         pb_log(0,"Under $ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz\n");
    1166         pb_system("tar cfz $pbpkg-$pbver.pbconf.tar.gz $pbpkg-$pbver/pbconf","Creating pbconf tar files compressed");
    1167         pb_log(0,"Under $ENV{'PBDESTDIR'}/$pbpkg-$pbver.pbconf.tar.gz\n");
     1170            pb_system("tar cfz $pbpkg-$pbver$pbextdir.tar.gz --exclude=$pbpkg-$pbver$pbextdir/pbconf $pbpkg-$pbver$pbextdir","Creating $pbpkg tar files compressed");
     1171        }
     1172        pb_log(0,"Under $ENV{'PBDESTDIR'}/$pbpkg-$pbver$pbextdir.tar.gz\n");
     1173        pb_system("tar cfz $pbpkg-$pbver$pbextdir.pbconf.tar.gz $pbpkg-$pbver$pbextdir/pbconf","Creating pbconf tar files compressed");
     1174        pb_log(0,"Under $ENV{'PBDESTDIR'}/$pbpkg-$pbver$pbextdir.pbconf.tar.gz\n");
    11681175
    11691176        # Keep track of version-tag per pkg
     
    11911198    print LAST "projtag $ENV{'PBPROJ'} = $ENV{'PBPROJTAG'}\n";
    11921199    print LAST "pbpackager $ENV{'PBPROJ'} = $ENV{'PBPACKAGER'}\n";
     1200    print LAST "pbextdir $ENV{'PBPROJ'} = $pbextdir\n";
    11931201    close(LAST);
    11941202}
     
    12271235    my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb","pbpkg");
    12281236    $pkg = { } if (not defined $pkg);
     1237    my $pbextdir = pb_get_extdir();
    12291238
    12301239    pb_mkdir_p("$ENV{'PBBUILDDIR'}") if (! -d "$ENV{'PBBUILDDIR'}");
     
    12451254        ($pbver,$pbtag) = split(/-/,$vertag);
    12461255
    1247         my $src="$ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz";
    1248         my $src2="$ENV{'PBDESTDIR'}/$pbpkg-$pbver.pbconf.tar.gz";
     1256        my $src="$ENV{'PBDESTDIR'}/$pbpkg-$pbver$pbextdir.tar.gz";
     1257        my $src2="$ENV{'PBDESTDIR'}/$pbpkg-$pbver$pbextdir.pbconf.tar.gz";
    12491258        pb_log(2,"Source file: $src\n");
    12501259        pb_log(2,"Pbconf file: $src2\n");
     
    12621271            symlink "$src","$ENV{'PBBUILDDIR'}/SOURCES/".basename($src) || die "Unable to symlink $src in $ENV{'PBBUILDDIR'}/SOURCES";
    12631272            # We need to first extract the spec file
    1264             my @specfile = pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/","$ENV{'PBBUILDDIR'}/SPECS","spec");
     1273            my @specfile = pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/","$ENV{'PBBUILDDIR'}/SPECS","spec");
    12651274
    12661275            # We need to handle potential patches to upstream sources
    1267             pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbpatch/","$ENV{'PBBUILDDIR'}/SOURCES","patch");
     1276            pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbpatch/","$ENV{'PBBUILDDIR'}/SOURCES","patch");
    12681277
    12691278            # We need to handle potential additional sources to upstream sources
    1270             pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbsrc/","$ENV{'PBBUILDDIR'}/SOURCES","src");
     1279            pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbsrc/","$ENV{'PBBUILDDIR'}/SOURCES","src");
    12711280
    12721281            pb_log(2,"specfile: ".Dumper(\@specfile)."\n");
     
    13011310            pb_system("tar xfz $src2","Extracting pbconf");
    13021311
    1303             chdir "$pbpkg-$pbver" || die "Unable to chdir to $pbpkg-$pbver";
     1312            chdir "$pbpkg-$pbver$pbextdir" || die "Unable to chdir to $pbpkg-$pbver$pbextdir";
    13041313            pb_rm_rf("debian");
    13051314            symlink "pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}","debian" || die "Unable to symlink to pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}";
     
    13081317            # We need to handle potential patches to upstream sources
    13091318            pb_mkdir_p("debian/patches");
    1310             my @f = pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbpatch/","debian/patches","patch");
     1319            my @f = pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbpatch/","debian/patches","patch");
    13111320
    13121321            # By default we use format 1.0 - Cf man dpkg-source
     
    13361345            }
    13371346            close(SERIE);
    1338             if ($debsrcfmt =~ /^1.*/) {
    1339                 # In that case we need to apply the patches ourselves locally
    1340                 pb_system("cat debian/patches/pbapplypatch","APPLY","verbose");
    1341                 pb_system("debian/patches/pbapplypatch","Applying patches to $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'} tree");
    1342             }
    13431347            if (@f) {
    1344                 # We have patches, so modify the name of files to be Debian compliant
    1345                 move("../$src","../$pbpkg-$pbver.orig.tar.gz");
     1348                # We have patches...
     1349                if ($debsrcfmt =~ /^1.*/) {
     1350                    # In that case we need to apply the patches ourselves locally
     1351                    pb_system("cat debian/patches/pbapplypatch","APPLY","verbose");
     1352                    pb_system("debian/patches/pbapplypatch","Applying patches to $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'} tree");
     1353                }
     1354                # ...so modify the name of files to be Debian compliant
     1355                move("../$src","../$pbpkg-$pbver$pbextdir.orig.tar.gz");
    13461356            }
    13471357
    13481358            # We need to handle potential additional sources to upstream sources
    1349             #pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbsrc/","$ENV{'PBBUILDDIR'}/debian","src");
     1359            #pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbsrc/","$ENV{'PBBUILDDIR'}/debian","src");
    13501360
    13511361            pb_distro_installdeps("debian/control",$pbos);
     
    13731383
    13741384            # We need to first extract the ebuild file
    1375             @ebuildfile = pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/","$tmpe","ebuild");
     1385            @ebuildfile = pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/","$tmpe","ebuild");
    13761386
    13771387            # Prepare the build env for gentoo
     
    14091419                    # Now move it where pb expects it
    14101420                    pb_mkdir_p("$ENV{'PBBUILDDIR'}/portage/pb/sys-apps/$pbpkg");
    1411                     if ($pbtag =~ /^0\./) {
    1412                         # This is a test version
    1413                         my $ntag = $pbtag;
    1414                         $ntag =~ s/^0\.//;
    1415                         move("$tmpe/$pbpkg-$pbver.ebuild","$ENV{'PBBUILDDIR'}/portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver"."_p$ntag.ebuild");
    1416                         $made="$made portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver"."_p$ntag.ebuild";
     1421                    if ($pbtag eq 0) {
     1422                        # This is assumed to be a test version
     1423                        my $nver = substr($pbver,0,-14);
     1424                        my $ntag = substr($pbver,-14);
     1425                        my $ebtg = "portage/pb/sys-apps/$pbpkg/$pbpkg-$nver"."_p$ntag.ebuild";
     1426                        move("$tmpe/$pbpkg-$pbver.ebuild","$ENV{'PBBUILDDIR'}/$ebtg");
     1427                        $made="$made $ebtg";
    14171428                    } else {
    1418                         move("$tmpe/$pbpkg-$pbver.ebuild","$ENV{'PBBUILDDIR'}/portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver-r$pbtag.ebuild");
    1419                         $made="$made portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver-r$pbtag.ebuild";
     1429                        my $ebtg = "portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver-r$pbtag.ebuild";
     1430                        move("$tmpe/$pbpkg-$pbver.ebuild","$ENV{'PBBUILDDIR'}/$ebtg");
     1431                        $made="$made $ebtg";
    14201432                    }
    14211433                }
     
    14281440            pb_system("tar xfz $src","Extracting sources");
    14291441            pb_system("tar xfz $src2","Extracting pbconf");
    1430             chdir "$pbpkg-$pbver" || die "Unable to chdir to $pbpkg-$pbver";
     1442            chdir "$pbpkg-$pbver$pbextdir" || die "Unable to chdir to $pbpkg-$pbver$pbextdir";
    14311443            symlink "pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}","install" || die "Unable to symlink to pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}";
    14321444            if (-x "install/pbslack") {
     
    14361448            }
    14371449            chdir ".." || die "Unable to chdir to parent dir";
    1438             pb_rm_rf("$pbpkg-$pbver");
     1450            pb_rm_rf("$pbpkg-$pbver$pbextdir");
    14391451        } elsif ($pbos->{'type'} eq "pkg") {
    14401452            # Solaris
     
    14481460            pb_system("tar xfz $src2","Extracting pbconf under $ENV{'PBBUILDDIR'}");
    14491461            # We need to handle potential patches to upstream sources
    1450             pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbpatch/","$ENV{'PBBUILDDIR'}","patch");
     1462            pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbpatch/","$ENV{'PBBUILDDIR'}","patch");
    14511463
    14521464            # We need to handle potential additional sources to upstream sources
    1453             pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbsrc/","$ENV{'PBBUILDDIR'}","src");
    1454 
    1455             chdir "$pbpkg-$pbver" || die "Unable to chdir to $pbpkg-$pbver";
     1465            pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbsrc/","$ENV{'PBBUILDDIR'}","src");
     1466
     1467            chdir "$pbpkg-$pbver$pbextdir" || die "Unable to chdir to $pbpkg-$pbver$pbextdir";
    14561468            if (-f "pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbbuild") {
    14571469                chmod 0755,"pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbbuild";
     
    14801492            }
    14811493            chdir ".." || die "Unable to chdir to parent dir";
    1482             pb_rm_rf("$pbpkg-$pbver","$ENV{'PBBUILDDIR'}/$pbos->{'type'}","$pkgdestdir");
     1494            pb_rm_rf("$pbpkg-$pbver$pbextdir","$ENV{'PBBUILDDIR'}/$pbos->{'type'}","$pkgdestdir");
    14831495        } elsif ($pbos->{'type'} eq "hpux") {
    14841496            # HP-UX
     
    14861498            pb_system("tar xfz $src2","Extracting pbconf");
    14871499
    1488             chdir "$pbpkg-$pbver" || die "Unable to chdir to $pbpkg-$pbver";
     1500            chdir "$pbpkg-$pbver$pbextdir" || die "Unable to chdir to $pbpkg-$pbver$pbextdir";
    14891501            pb_system("buildpackage ","Building package","verbose");
    14901502            # Get the name of the generated packages
     
    15011513
    15021514            chdir ".." || die "Unable to chdir to parent dir";
    1503             pb_rm_rf("$pbpkg-$pbver");
     1515            pb_rm_rf("$pbpkg-$pbver$pbextdir");
    15041516        } else {
    15051517            die "Unknown OS type format $pbos->{'type'}";
     
    16481660    my $pbos;
    16491661
     1662    my $pbextdir = pb_get_extdir();
     1663
    16501664    if ($cmt ne "Announce") {
    16511665        # Get list of packages to build
     
    16681682
    16691683            if (($cmt eq "Sources") || ($cmt =~ /(V[EM]|RM)build/)) {
    1670                 $src = "$src $ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz $ENV{'PBDESTDIR'}/$pbpkg-$pbver.pbconf.tar.gz";
     1684                $src = "$src $ENV{'PBDESTDIR'}/$pbpkg-$pbver$pbextdir.tar.gz $ENV{'PBDESTDIR'}/$pbpkg-$pbver$pbextdir.pbconf.tar.gz";
    16711685                if ($cmd eq "") {
    1672                     $cmd = "ln -sf $pbpkg-$pbver.tar.gz $pbpkg-latest.tar.gz";
     1686                    $cmd = "ln -sf $pbpkg-$pbver$pbextdir.tar.gz $pbpkg-latest.tar.gz";
    16731687                } else {
    1674                     $cmd = "$cmd ; ln -sf $pbpkg-$pbver.tar.gz $pbpkg-latest.tar.gz";
     1688                    $cmd = "$cmd ; ln -sf $pbpkg-$pbver$pbextdir.tar.gz $pbpkg-latest.tar.gz";
    16751689                }
    16761690            } elsif ($cmt eq "Web") {
    1677                 $src = "$src $ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz"
     1691                $src = "$src $ENV{'PBDESTDIR'}/$pbpkg-$pbver$pbextdir.tar.gz"
    16781692            }
    16791693
     
    30483062            # Get content saved in cms2build
    30493063            my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb","pbpkg");
     3064            my $pbextdir = pb_get_extdir();
    30503065            die "Unable to get package list" if (not defined $pkg);
    30513066
     
    30593074            if ($vtype eq "ve") {
    30603075                my ($vepath) = pb_conf_get("vepath");
    3061                 copy("$ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1.tar.gz","$vepath->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/tmp");
    3062                 copy("$ENV{'PBDESTDIR'}/project-builder-$pbver2.tar.gz","$vepath->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/tmp");
     3076                copy("$ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1$pbextdir.tar.gz","$vepath->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/tmp");
     3077                copy("$ENV{'PBDESTDIR'}/project-builder-$pbver2$pbextdir.tar.gz","$vepath->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/tmp");
    30633078            } else {
    3064                 pb_system("scp -i $keyfile -p -o UserKnownHostsFile=/dev/null -P $nport $ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1.tar.gz $ENV{'PBDESTDIR'}/project-builder-$pbver2.tar.gz root\@$vmhost->{$ENV{'PBPROJ'}}:/tmp","Copying local project files to $vtype.");
    3065             }
    3066             $cmdget = "mv /tmp/ProjectBuilder-$pbver1.tar.gz ProjectBuilder-latest.tar.gz ; mv /tmp/project-builder-$pbver2.tar.gz project-builder-latest.tar.gz";
     3079                pb_system("scp -i $keyfile -p -o UserKnownHostsFile=/dev/null -P $nport $ENV{'PBDESTDIR'}/ProjectBuilder-$pbver1$pbextdir.tar.gz $ENV{'PBDESTDIR'}/project-builder-$pbver2$pbextdir.tar.gz root\@$vmhost->{$ENV{'PBPROJ'}}:/tmp","Copying local project files to $vtype.");
     3080            }
     3081            $cmdget = "mv /tmp/ProjectBuilder-$pbver1$pbextdir.tar.gz ProjectBuilder-latest.tar.gz ; mv /tmp/project-builder-$pbver2$pbextdir.tar.gz project-builder-latest.tar.gz";
    30673082        } else {
    30683083            $cmdget = "wget --passive-ftp ftp://ftp.project-builder.org/src/ProjectBuilder-latest.tar.gz; wget --passive-ftp ftp://ftp.project-builder.org/src/project-builder-latest.tar.gz";
     
    33033318        my $pbrealpkgdeb = pb_cms_get_real_pkg($pbpkg,"deb");
    33043319        if ($antype eq "Clean") {
    3305             $pbtag = "0.[0-9][0-9]*";
    3306             $findstr .= "-name \'$pbrealpkgrpm-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgrpm-debug-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag"."_*\.deb\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag.dsc\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag.tar.gz\' -o -name \'$pbrealpkg-$pbver"."_p[0-9]*\.ebuild\' -o -name \'$pbrealpkg-$pbver-$pbtag*\.pkg\' -o -name \'$pbrealpkg-$pbver-$pbtag*\.sd\' ";
     3320            # We only clean test versions anyway
     3321            $pbtag = "0";
     3322            my $nver = $pbver;
     3323            my $ntag = "[2-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]";
     3324            $pbver .= $ntag;
     3325            $findstr .= "-name \'$pbrealpkgrpm-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgrpm-debug-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag"."_*\.deb\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag.dsc\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag.tar.gz\' -o -name \'$pbrealpkg-$nver"."_p$ntag\.ebuild\' -o -name \'$pbrealpkg-$pbver-$pbtag*\.pkg\' -o -name \'$pbrealpkg-$pbver-$pbtag*\.sd\' ";
    33073326            $srcstr .= "src/$pbrealpkg-$pbver.tar.gz src/$pbrealpkg-$pbver.pbconf.tar.gz ";
    33083327        } else {
    33093328            my @date=pb_get_date();
    33103329            # the matching is only done on packages made the same day for test version. Hopefully this is enough
    3311             $pbtag = "0.".strftime("%Y%m%d*", @date) if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i) && ($antype eq "Check"));
    3312             $findstr .= "-name \'$pbrealpkgrpm-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgdeb"."_$pbver*\.deb\' -o -name \'$pbrealpkg-$pbver*\.ebuild\' -o -name \'$pbrealpkg-$pbver*\.pkg\' -o -name \'$pbrealpkg-$pbver*\.sd\' ";
     3330            my $nver = $pbver;
     3331            if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i) && ($antype eq "Check")) {
     3332                $pbtag = "0";
     3333                my $ntag .= strftime("%Y%m%d*", @date);
     3334                $nver = $pbver."_p$ntag";
     3335                $pbver .= $ntag;
     3336            }
     3337            $findstr .= "-name \'$pbrealpkgrpm-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgdeb"."_$pbver*\.deb\' -o -name \'$pbrealpkg-$nver*\.ebuild\' -o -name \'$pbrealpkg-$pbver*\.pkg\' -o -name \'$pbrealpkg-$pbver*\.sd\' ";
    33133338        }
    33143339
     
    33283353            $pb->{'tag'} = $pbtag;
    33293354            $pb->{'date'} = $pbdate;
     3355            $pb->{'extdir'} = pb_get_extdir();
    33303356            $pb->{'chglog'} = $chglog;
    33313357            $pb->{'packager'} = $pbpackager;
     
    40434069}   
    40444070
     4071sub pb_get_extdir () {
     4072
     4073    # the pbrc file should contain it and whatever the key, we take it
     4074    my ($ed) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc","pbextdir");
     4075    pb_log(2,"ed: ".Dumper($ed)."\n");
     4076    my $pbextdir = "";
     4077    foreach my $k (keys %$ed) {
     4078        $pbextdir = $ed->{$k};
     4079    }
     4080    pb_log(2,"pbextdir: $pbextdir\n");
     4081    return($pbextdir);
     4082}
     4083
    404540841;
  • devel/pb/lib/ProjectBuilder/Changelog.pm

    r1262 r1432  
    6666my $pbver = $pb->{'ver'};
    6767my $pbtag = $pb->{'tag'};
     68my $pbextdir = $pb->{'extdir'};
    6869my $pbsuf = $pb->{'pbos'}->{'suffix'};
    6970my $OUTPUT = shift;
     
    109110    $ndate = &UnixDate($date,"%a", "%b", "%d", "%Y");
    110111    $n2date = &UnixDate($date,"%a, %d %b %Y %H:%M:%S %z");
     112    # usefule mostly for test versions
     113    $pbver .= $pbextdir;
    111114    if ($dtype eq "rpm") {
    112115        $ver2 = "$pbver-$pbtag";
     
    151154while (<INPUT>) {
    152155    ($ver, $date) = split(/ /);
     156    # In case there is a v before the real version string
    153157    $ver =~ s/^v//;
    154158    chomp($date);
     
    162166    if ($ver !~ /-/) {
    163167        if ($first eq 1) {
    164             $ver2 = "$ver-$pbtag";
     168            $ver2 = "$ver$pbextdir-$pbtag";
    165169            $first = 0;
    166170        } else {
  • pbconf/devel/pbfilter/all.pbf

    r1168 r1432  
    1414
    1515# PBVER is replaced by the version ($pb->{'ver'} in code)
    16 filter PBVER = $pb->{'ver'}
     16filter PBVER = $pb->{'ver'}$pb->{'extdir'}
    1717
    1818# PBDATE is replaced by the date ($pb->{'date'} in code)
  • projects/CDDBeditor/pbconf/devel/pbfilter/all.pbf

    r862 r1432  
    1414
    1515# PBVER is replaced by the version ($pb->{'ver'} in code)
    16 filter PBVER = $pb->{'ver'}
     16filter PBVER = $pb->{'ver'}$pb->{'extdir'}
    1717
    1818# PBDATE is replaced by the date ($pb->{'date'} in code)
  • projects/dploy/pbconf/devel/pbfilter/all.pbf

    r502 r1432  
    88
    99# PBVER is replaced by the version ($pb->{'ver'} in code)
    10 filter PBVER = $pb->{'ver'}
     10filter PBVER = $pb->{'ver'}$pb->{'extdir'}
    1111
    1212# PBDATE is replaced by the date ($pb->{'date'} in code)
  • projects/fossology/pbconf/trunk/pbfilter/all.pbf

    r599 r1432  
    1414
    1515# PBVER is replaced by the version ($pb->{'ver'} in code)
    16 filter PBVER = $pb->{'ver'}
     16filter PBVER = $pb->{'ver'}$pb->{'extdir'}
    1717
    1818# PBDATE is replaced by the date ($pb->{'date'} in code)
  • projects/itop/pbconf/trunk/pbfilter/all.pbf

    r1373 r1432  
    1414
    1515# PBVER is replaced by the version ($pb->{'ver'} in code)
    16 filter PBVER = $pb->{'ver'}
     16filter PBVER = $pb->{'ver'}$pb->{'extdir'}
    1717
    1818# PBDATE is replaced by the date ($pb->{'date'} in code)
  • projects/linuxcoe/pbconf/cvs/pbfilter/all.pbf

    r734 r1432  
    99
    1010# PBVER is replaced by the version ($pb->{'ver'} in code)
    11 filter PBVER = $pb->{'ver'}
     11filter PBVER = $pb->{'ver'}$pb->{'extdir'}
    1212
    1313# PBDATE is replaced by the date ($pb->{'date'} in code)
  • projects/mondorescue/pbconf/branches/3.0/pbfilter/all.pbf

    r506 r1432  
    1111
    1212# PBVER is replaced by the version ($pb->{'ver'} in code)
    13 filter PBVER = $pb->{'ver'}
     13filter PBVER = $pb->{'ver'}$pb->{'extdir'}
    1414
    1515# PBDATE is replaced by the date ($pb->{'date'} in code)
  • projects/mondorescue/pbconf/branches/3.1/pbfilter/all.pbf

    r506 r1432  
    1111
    1212# PBVER is replaced by the version ($pb->{'ver'} in code)
    13 filter PBVER = $pb->{'ver'}
     13filter PBVER = $pb->{'ver'}$pb->{'extdir'}
    1414
    1515# PBDATE is replaced by the date ($pb->{'date'} in code)
  • projects/mondorescue/pbconf/devel/pbfilter/all.pbf

    r1010 r1432  
    1111
    1212# PBVER is replaced by the version ($pb->{'ver'} in code)
    13 filter PBVER = $pb->{'ver'}
     13filter PBVER = $pb->{'ver'}$pb->{'extdir'}
    1414
    1515# PBDATE is replaced by the date ($pb->{'date'} in code)
Note: See TracChangeset for help on using the changeset viewer.