From 71cf008c8c06e5e2aeb5e913cec6f2eb88878063 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 18 Aug 2009 16:00:53 +0000 Subject: implement tlmgr list --only-installed git-svn-id: svn://tug.org/texlive/trunk@14747 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf/scripts/texlive/tlmgr.pl | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'Master/texmf') diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index fe823c3fa26..f9ab3e56f63 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -131,6 +131,7 @@ sub main { "force" => 1, "dry-run|n" => 1 }, "show" => { "list" => 1 }, + "list" => { "only-installed" => 1 }, "search" => { "global" => 1, "file" => 1 }, "restore" => { "backupdir" => "=s", @@ -2162,14 +2163,20 @@ sub action_list { } else { $what = ""; } - init_tlmedia(); + my $tlm; + if ($opts{"only-installed"}) { + $tlm = $localtlmedia; + } else { + init_tlmedia(); + $tlm = $tlmediasrc; + } my @whattolist; if ($what =~ m/^collection/i) { - @whattolist = $tlmediasrc->tlpdb->collections; + @whattolist = $tlm->tlpdb->collections; } elsif ($what =~ m/^scheme/i) { - @whattolist = $tlmediasrc->tlpdb->schemes; + @whattolist = $tlm->tlpdb->schemes; } else { - @whattolist = $tlmediasrc->tlpdb->list_packages; + @whattolist = $tlm->tlpdb->list_packages; } foreach (@whattolist) { if (defined($localtlpdb->get_package($_))) { @@ -2177,7 +2184,7 @@ sub action_list { } else { print " "; } - my $foo = $tlmediasrc->tlpdb->get_package($_)->shortdesc; + my $foo = $tlm->tlpdb->get_package($_)->shortdesc; print "$_: ", defined($foo) ? $foo : "(shortdesc missing)" , "\n"; } return; @@ -4260,7 +4267,7 @@ dependencies. When given with schemes and collections, B<--list> outputs their dependencies in a similar way. -=head2 list [collections|schemes|I...] +=head2 list [--only-installed] [collections|schemes|I...] With no argument, lists all packages available at the default install location, prefixing those already installed with C. @@ -4270,6 +4277,10 @@ the request type. With anything else as arguments, operates as the C action. +If the option C<--only-installed> is given the installation source will +not be used and only locally installed packages, collections, or schemes +are listed. + =head2 check [I