aboutsummaryrefslogtreecommitdiff
path: root/sbosrcarch
diff options
context:
space:
mode:
Diffstat (limited to 'sbosrcarch')
-rwxr-xr-xsbosrcarch9
1 files changed, 8 insertions, 1 deletions
diff --git a/sbosrcarch b/sbosrcarch
index a8387dd..2c4c8ae 100755
--- a/sbosrcarch
+++ b/sbosrcarch
@@ -1295,7 +1295,14 @@ sub purge_pass_2_wanted {
# helper for purge_mode, removes all files in by-md5
# dirs that aren't listed in %keep_md5sums
sub purge_pass_3_wanted {
- print "purge_pass_3_wanted $_\n";
+ s,^\./,,; # remove leading ./
+ return unless -d $_; # not necessarily necessary...
+ my (undef, undef, undef, $md5sum) = split /\//, $_;
+ if($keep_md5sums{$md5sum}) {
+ print "keep md5sum: $md5sum\n";
+ } else {
+ print "rmtree $_\n";
+ }
}
sub rebuild_wanted {