aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsbosrcarch16
1 files changed, 12 insertions, 4 deletions
diff --git a/sbosrcarch b/sbosrcarch
index 8810261..7d96c49 100755
--- a/sbosrcarch
+++ b/sbosrcarch
@@ -115,15 +115,23 @@ quickly and not eat many resources. For each new URL, the file is
downloaded and added to the archive, but the old file is *not* deleted
(use 'sbosrcarch purge' to do that).
-=item B<purge> I<[-r|--rebuild]>
+=item B<purge> I<[-r|--rebuild]>|I<[-f|--fake]>
Purge files from the archive that are no longer referenced by any
.info file. Should be run monthly or quarterly as a cron job. This is
more resource-intensive than an update, as it must read and parse every
.info file in the SBo repository.
-If -r or --rebuild is given, the entire by-md5 tree is deleted and recreated.
-This shouldn't be needed unless $symlinks (see B<CONFIG FILE>) is changed.
+If -r or --rebuild is given, the entire by-md5 tree is deleted and
+recreated. This shouldn't be needed unless $symlinks (see B<CONFIG FILE>)
+is changed, or something catastrophic happens to the by-md5 tree. Don't
+do this automatically from cron: while it's running, your archive users
+will see an incomplete by-md5 tree.
+
+If -f or --fake is given, a list of files to be purged will be produced,
+but nothing will actually be deleted. This option B<cannot> be combined
+with -r/--rebuild, and no warning will be given if it's tried: whichever
+option occurs first will take effect, and the other one will be ignored!
=item B<trim>
@@ -1313,7 +1321,7 @@ sub purge_pass_3_wanted {
#print "keep md5sum: $md5sum\n";
} else {
print "purge $_\n";
- rmtree($_) unless $fake_purge;
+ rmtree(md5_dir($_)) unless $fake_purge;
}
}