Changeset 1420


Ignore:
Timestamp:
Feb 24, 2012, 2:47:40 AM (8 years ago)
Author:
bruno
Message:
  • Fix 2 bugs in newver with automatic change of version and delivery check to be done.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1409 r1420  
    26212621    open(OUT,"> $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.pb.new") || die "Unable to write to $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.pb.new";
    26222622    while(<FILE>) {
    2623         if (/^projver\s+$ENV{'PBPROJ'}\s*=\s*$oldvertxt/) {
    2624             s/^projver\s+$ENV{'PBPROJ'}\s*=\s*$oldvertxt/projver $ENV{'PBPROJ'} = $newvertxt/;
     2623        if (/^projver\s+$ENV{'PBPROJ'}\s*=\s*$oldvertxt$/) {
     2624            s/^projver\s+$ENV{'PBPROJ'}\s*=\s*$oldvertxt$/projver $ENV{'PBPROJ'} = $newvertxt/;
    26252625            pb_log(0,"Changing projver from $oldvertxt to $newvertxt in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.pb\n");
    26262626        }
     
    26302630        }
    26312631        if (/^delivery/) {
    2632             pb_log(0,"Please check delivery (".chomp($_).") in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.pb\n");
     2632            my $txt = $_;
     2633            chomp($txt);
     2634            pb_log(0,"Please check delivery ($txt) in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.pb\n");
    26332635        }
    26342636        print OUT $_;
     
    32903292            $srcstr .= "src/$pbrealpkg-$pbver.tar.gz src/$pbrealpkg-$pbver.pbconf.tar.gz ";
    32913293        } else {
     3294            my @date=pb_get_date();
     3295            # the matching is only done on packages made the same day for test version. Hopefully this is enough
     3296            $pbtag = "0.".strftime("%Y%m%d*", @date) if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i) && ($antype eq "Check"));
    32923297            $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\' ";
    32933298        }
     
    33253330                } elsif ($pbos->{'type'} eq "deb") {
    33263331                    $theorlist{"$pbos->{'name'}/$pbos->{'version'}/$pbrealpkgdeb"."_$pbver-$pbtag"} = 0;
     3332                    # TODO are we always using the last arch ?
    33273333                    $archlist{"$pbos->{'name'}/$pbos->{'version'}/$pbrealpkgdeb"."_$pbver-$pbtag"} = "$pbos->{'arch'}";
    33283334                } elsif ($pbos->{'type'} eq "ebuild") {
    3329                     $theorlist{"$pbos->{'name'}/$pbos->{'version'}/$pbrealpkg-$pbver-r$pbtag.ebuild"} = 0;
    3330                     $archlist{"$pbos->{'name'}/$pbos->{'version'}/$pbrealpkg-$pbver-r$pbtag.ebuild"} = "$pbos->{'arch'}";
     3335                    $theorlist{"$pbos->{'name'}/$pbos->{'version'}/$pbrealpkg-$pbver"."_p$pbtag.ebuild"} = 0;
     3336                    $archlist{"$pbos->{'name'}/$pbos->{'version'}/$pbrealpkg-$pbver"."_p$pbtag.ebuild"} = "$pbos->{'arch'}";
    33313337                } elsif ($pbos->{'type'} eq "pkg") {
    33323338                    $theorlist{"$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/$pbrealpkg-$pbver-$pbtag.pkg"} = 0;
     
    34063412            $p =~ s/\.(i[3456]86|x86_64|noarch|src)\.rpm$//;
    34073413            $p =~ s/_(i[3456]86|amd64|all).deb$//;
     3414            $p =~ s/(-0\.|_p[0-9]{8})[0-9]{6}/$1*/ if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i));
    34083415            $theorlist{$p} = -2 if (not defined $theorlist{$p});
    34093416            $theorlist{$p} = $theorlist{$p} + 1;
     
    34283435                pb_log(0,"Extra Package found for $t\n");
    34293436            } else {
     3437                pb_log(2,"Analyzing $t\n");
    34303438                my ($os,$ver,$arch,$package) = split(/\//,$t);
    34313439                # Some distro have no arch subdir
Note: See TracChangeset for help on using the changeset viewer.