summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-06-23 06:19:51 +0000
committerNorbert Preining <preining@logic.at>2009-06-23 06:19:51 +0000
commit39395dc3b3b4c1b672eb15a57eb302dd4b02dde2 (patch)
treef56f6a57d6a1d946c1fcb55c4e93e91213319ce7 /Master/texmf
parent757dd2d4888fbb866f6075bd1039c436c561c392 (diff)
onl issue the auto-remove message if it would be actually carried out
git-svn-id: svn://tug.org/texlive/trunk@13909 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl30
1 files changed, 17 insertions, 13 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index bd165c8b522..3707b6b2acd 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -1578,25 +1578,29 @@ sub action_update {
info("not removing $p due to -no-remove (removed on server)\n");
} else {
my $rev = $localtlmedia->tlpdb->get_package($p)->revision;
- if ($::machinereadable) {
- # TODO version numbers
- machine_line($p, $FLAG_REMOVE, $rev, "-", "-");
- } else {
- if ($opts{"list"}) {
- info("$p: local: $rev, source: <absent> (auto-remove)\n");
+ if ($opts{"list"}) {
+ if ($::machinereadable) {
+ machine_line($p, $FLAG_REMOVE, $rev, "-", "-");
} else {
+ info("$p: local: $rev, source: <absent> (auto-remove)\n");
+ }
+ } else {
+ # new we are sure that:
+ # - $opts{"no-remove"} is *not* set
+ # - $opts{"list"} is *not* set
+ # we have to check in addition that
+ # - $opts{"dry-run"} is not set
+ # - and that we do --all updates, not single package updates
+ if ($opts{"all"}) {
info("[$currnr/$totalnr] auto-remove: $p\n");
+ if (!$opts{"dry-run"}) {
+ $localtlmedia->remove_package($p);
+ logpackage("remove: $p");
+ }
}
}
$currnr++;
}
- # we only remove packages when update --all is called, not on single
- # package updates
- if ($opts{"all"} and
- !($opts{"dry-run"} or $opts{"list"} or $opts{"no-remove"})) {
- $localtlmedia->remove_package($p);
- logpackage("remove: $p");
- }
}