From 592e52ce9f4a7edc945bb17073af43e8e261509f Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 4 Jun 2018 00:37:40 -0400 Subject: sbosrcarch purge_mode fix, wip --- sbosrcarch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sbosrcarch') 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 { -- cgit v1.2.3