summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-08-18 16:00:53 +0000
committerNorbert Preining <preining@logic.at>2009-08-18 16:00:53 +0000
commit71cf008c8c06e5e2aeb5e913cec6f2eb88878063 (patch)
treec2f8ecc3ba186026589a148acf7616f6e7803982 /Master/texmf
parent4829573badbeeb9bfb7eaa8c836b3397d10982dc (diff)
implement tlmgr list --only-installed
git-svn-id: svn://tug.org/texlive/trunk@14747 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl23
1 files changed, 17 insertions, 6 deletions
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<pkg>...]
+=head2 list [--only-installed] [collections|schemes|I<pkg>...]
With no argument, lists all packages available at the default install
location, prefixing those already installed with C<i>.
@@ -4270,6 +4277,10 @@ the request type.
With anything else as arguments, operates as the C<show> 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<option>]... [files|depends|executes|runfiles|all]