Changeset 1424 in ProjectBuilder


Ignore:
Timestamp:
Feb 25, 2012, 2:23:00 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • use more pb_rm_rf function instead of calling pb_system rm -rf
  • Fix bugs on check for gentoo. -r is for official versions, _p for test versions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1420 r1424  
    13531353            close(LOG);
    13541354            chdir ".." || die "Unable to chdir to parent dir";
    1355             pb_system("rm -rf $pbpkg-$pbver", "Cleanup");
     1355            pb_rm_rf("$pbpkg-$pbver");
    13561356        } elsif ($pbos->{'type'} eq "ebuild") {
    13571357            my @ebuildfile;
     
    14271427            }
    14281428            chdir ".." || die "Unable to chdir to parent dir";
    1429             pb_system("rm -rf $pbpkg-$pbver", "Cleanup");
     1429            pb_rm_rf("$pbpkg-$pbver");
    14301430        } elsif ($pbos->{'type'} eq "pkg") {
    14311431            # Solaris
     
    14711471            }
    14721472            chdir ".." || die "Unable to chdir to parent dir";
    1473             pb_system("rm -rf $pbpkg-$pbver $ENV{'PBBUILDDIR'}/$pbos->{'type'} $pkgdestdir", "Cleanup");
     1473            pb_rm_rf("$pbpkg-$pbver","$ENV{'PBBUILDDIR'}/$pbos->{'type'}","$pkgdestdir");
    14741474        } elsif ($pbos->{'type'} eq "hpux") {
    14751475            # HP-UX
     
    14921492
    14931493            chdir ".." || die "Unable to chdir to parent dir";
    1494             pb_system("rm -rf $pbpkg-$pbver", "Cleanup");
     1494            pb_rm_rf("$pbpkg-$pbver");
    14951495        } else {
    14961496            die "Unknown OS type format $pbos->{'type'}";
     
    33333333                    $archlist{"$pbos->{'name'}/$pbos->{'version'}/$pbrealpkgdeb"."_$pbver-$pbtag"} = "$pbos->{'arch'}";
    33343334                } elsif ($pbos->{'type'} eq "ebuild") {
    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'}";
     3335                    my $prefix = "-r";
     3336                    $prefix = "_p" if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i));
     3337                    $theorlist{"$pbos->{'name'}/$pbos->{'version'}/$pbrealpkg-$pbver$prefix$pbtag.ebuild"} = 0;
     3338                    $archlist{"$pbos->{'name'}/$pbos->{'version'}/$pbrealpkg-$pbver$prefix$pbtag.ebuild"} = "$pbos->{'arch'}";
    33373339                } elsif ($pbos->{'type'} eq "pkg") {
    33383340                    $theorlist{"$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/$pbrealpkg-$pbver-$pbtag.pkg"} = 0;
     
    34123414            $p =~ s/\.(i[3456]86|x86_64|noarch|src)\.rpm$//;
    34133415            $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));
     3416            $p =~ s/(-0\.[0-9]{8})[0-9]{6}/$1*/ if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i));
     3417            $p =~ s/(-r|_p[0-9]+)\.ebuild/$1*/ if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i));
    34153418            $theorlist{$p} = -2 if (not defined $theorlist{$p});
    34163419            $theorlist{$p} = $theorlist{$p} + 1;
Note: See TracChangeset for help on using the changeset viewer.