summaryrefslogtreecommitdiff
path: root/Master/texmf/scripts
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-09-29 01:17:04 +0000
committerNorbert Preining <preining@logic.at>2010-09-29 01:17:04 +0000
commit8f19a89ac50a060c8f6bb928151f93d2d2238875 (patch)
tree67d43faeadba88733b43d957b6083b13712b6e5d /Master/texmf/scripts
parent1e1ff4eeff11ac4910999a68b598b3f1409e7e79 (diff)
make sure that when calling backup --clean --all also packages that
are not present anymore are pruned git-svn-id: svn://tug.org/texlive/trunk@19943 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl15
1 files changed, 15 insertions, 0 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index a32138dac7d..534cf38015d 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -1383,6 +1383,21 @@ sub action_backup {
}
}
+ # if we do --clean --all we also want to remove packages that
+ # are not present anymore in the tlpdb, so use the readdir mode
+ # to determine backups
+ if ($opts{"all"} && $clean_mode) {
+ # initialize the hash(packages) of hash(revisions)
+ my %backups = get_available_backups($opts{"backupdir"});
+ init_local_db(1);
+ for my $p (sort keys %backups) {
+ clear_old_backups ($p, $opts{"backupdir"}, $opts{"clean"}, $opts{"dry-run"});
+ }
+ return 1;
+ }
+
+ # in case we are not cleaning or cleaning only specific packages
+ # use the one-by-one mode
my @todo;
if ($opts{"all"}) {
@todo = $localtlpdb->list_packages;