Changeset 1703


Ignore:
Timestamp:
Mar 1, 2013, 4:47:51 PM (5 years ago)
Author:
bruno
Message:
  • Fix #119 by improving correct deb and ebuild detection. Will also work for announces
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1702 r1703  
    36723672            $srcstr .= "src/$pbrealpkg-$pbver.tar.gz src/$pbrealpkg-$pbver.pbconf.tar.gz ";
    36733673        } else {
     3674            # "Announce" and "Check"
    36743675            my @date=pb_get_date();
    36753676            # the matching is only done on packages made the same day for test version. Hopefully this is enough
    3676             my $nver = $pbver;
    3677             if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i) && ($antype eq "Check")) {
     3677            my $nver;
     3678            if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) {
    36783679                $pbtag = "0";
    36793680                my $ntag .= strftime("%Y%m%d*", @date);
    36803681                $nver = $pbver."_p$ntag";
    36813682                $pbver .= $ntag;
    3682             }
    3683             $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\' ";
     3683            } else {
     3684                $nver = $pbver."-r$pbtag";
     3685            }
     3686            $findstr .= "-name \'$pbrealpkgrpm-$pbver-$pbtag\.*.rpm\' -o -name \'$pbrealpkgdeb"."_$pbver-$pbtag"."_*\.deb\' -o -name \'$pbrealpkg-$nver\.ebuild\' -o -name \'$pbrealpkg-$pbver\.pkg\' -o -name \'$pbrealpkg-$pbver\.sd\' ";
    36843687        }
    36853688
     
    37923795        }
    37933796    } else {
    3794         # In Check mode we need to compare the 2 lists (real and theoritical)
     3797        # In "Check" mode we need to compare the 2 lists (real and theoritical)
    37953798        while (<LOG>) {
    37963799            # Get package name and remove what is in extra for the theoritical list (arch at the end)
     
    38003803            my $p = $_;
    38013804            $p =~ s/\.(i[3456]86|x86_64|noarch|src)\.rpm$//;
    3802             $p =~ s/_(i[3456]86|amd64|all).deb$//;
     3805            $p =~ s/_(i[3456]86|amd64|all)\.deb$//;
    38033806            $p =~ s/(-0\.[0-9]{8})[0-9]{6}/$1*/ if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i));
    38043807            $p =~ s/(-r|_p[0-9]+)\.ebuild/$1*/ if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i));
Note: See TracChangeset for help on using the changeset viewer.