From 39395dc3b3b4c1b672eb15a57eb302dd4b02dde2 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 23 Jun 2009 06:19:51 +0000 Subject: 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 --- Master/texmf/scripts/texlive/tlmgr.pl | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'Master/texmf') 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: (auto-remove)\n"); + if ($opts{"list"}) { + if ($::machinereadable) { + machine_line($p, $FLAG_REMOVE, $rev, "-", "-"); } else { + info("$p: local: $rev, source: (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"); - } } -- cgit v1.2.3