From 227ebe2cb5e11abb7e12b88ba66adc7735fa9570 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 28 Aug 2009 17:30:56 +0000 Subject: make --exclude also exclude pkg.arch, and show size on actual update, too git-svn-id: svn://tug.org/texlive/trunk@14923 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf/scripts/texlive/tlmgr.pl | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'Master/texmf/scripts') diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 3653f8271b9..21c71b66422 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -1763,11 +1763,13 @@ sub action_update { my @new; my @addlines; - foreach my $pkg (sort @todo) { + TODO: foreach my $pkg (sort @todo) { next if ($pkg =~ m/^00texlive/); - if (TeXLive::TLUtils::member($pkg, @excluded_pkgs)) { - info("Skipping excluded package $pkg\n"); - next; + for my $ep (@excluded_pkgs) { + if ($pkg eq $ep || $pkg =~ m/^$ep\./) { + info("Skipping excluded package $pkg\n"); + next TODO; + } } my $tlp = $localtlpdb->get_package($pkg); if (!defined($tlp)) { @@ -1961,11 +1963,11 @@ sub action_update { } machine_line(@maargs); } else { + my $kb = int($sizes{$pkg} / 1024) + 1; if ($opts{"list"}) { - my $kb = int($sizes{$pkg} / 1024) + 1; info("$pkg (${kb}KB): local: , source: " . $mediatlp->revision . " (auto-install)\n"); } else { - info("[$currnr/$totalnr, $estrem/$esttot] auto-install: $pkg\n"); + info("[$currnr/$totalnr, $estrem/$esttot] auto-install: $pkg (${kb}KB)\n"); } } $currnr++; @@ -2056,7 +2058,8 @@ sub action_update { if ($::machinereadable) { machine_line($pkg, $FLAG_UPDATE, $rev, $mediarev, $sizes{$pkg}, $estrem, $esttot); } else { - info("[$currnr/$totalnr, $estrem/$esttot] update: $pkg ($rev -> $mediarev)"); + my $kb = int ($sizes{$pkg} / 1024); + info("[$currnr/$totalnr, $estrem/$esttot] update: $pkg (${kb}KB) ($rev -> $mediarev)"); } $donesize += $sizes{$pkg}; $currnr++; @@ -4178,8 +4181,13 @@ removed, without actually changing anything. =item B<--exclude I> Exclude I from the update process. This option can be given -multiple times. The name given on the command line must match exactely -to package name. +multiple times. Giving a string C here will exclude the package +C itself and all packages C. As an example giving + + tlmgr update --all --exclude a2ping + +will not update C itself, but neither C or +any other arch-package C. =item B<--dry-run> -- cgit v1.2.3