prtwash: use stricter regex to identify latest built package
This commit is contained in:
parent
bb58beecda
commit
9f5096eb27
@ -156,7 +156,7 @@ sub keeplist { # remember to pop off the last two elements for regex purposes
|
||||
push(@keepers, $ki);
|
||||
}
|
||||
}
|
||||
push (@keepers, "$name#$version.*\.pkg\.tar\.$compression_mode");
|
||||
push (@keepers, "$name#$version-$release\.pkg\.tar\.$compression_mode");
|
||||
push (@keepers, "$name#.*\.pkg\.tar\.$compression_mode");
|
||||
return @keepers;
|
||||
}
|
||||
@ -192,7 +192,7 @@ sub do_wash {
|
||||
foreach my $f (sort(readdir(DIR))) {
|
||||
next if ($f eq '.' or $f eq '..');
|
||||
if ($iswanted{$f} or ($options{pkgtoo}==0)*($f =~ /$currbuild/)
|
||||
or ($options{oldver}==0)*($f =~ /$allbuilds/)*($f !~ /$currbuild/)) {
|
||||
or ($options{oldver}==0)*($f =~ /$allbuilds/)*($f !~ /$currbuild/)) {
|
||||
print "... keeping file $port/$f.\n" unless $options{quiet} == 1;
|
||||
} else {
|
||||
remove ("$port/$f");
|
||||
@ -214,7 +214,6 @@ sub getportdirs { # returns scalar references to two arrays
|
||||
$line =~ s/^prtdir\s+//; #remove the leading directive
|
||||
$line =~ s/#.*$//; #strip inline comments like this one
|
||||
$line =~ s/\s+//g; #collapse all whitespace, even if in a path!
|
||||
#(not that we ever put spaces or commas in repo names anyway)
|
||||
if ( $line !~ /:/ ) {
|
||||
push @basedirs, $line if (-d $line);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user