summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-09-27 22:27:41 +0000
committerNorbert Preining <preining@logic.at>2008-09-27 22:27:41 +0000
commit3fc2f9ad8428b4e3f9da2925bb0314cebe1d99d3 (patch)
tree5389265e212005bb785973cbbbccde8192badf0f
parent7fe152e24be8fa1c3eab92de95147020810fd87a (diff)
tlmgr show now also shows the collection in which a package is included
git-svn-id: svn://tug.org/texlive/trunk@10754 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 546f9fb0f3b..77399e956d2 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -439,6 +439,7 @@ sub action_show {
}
init_local_db();
my $tlmediatlpdb;
+ my @colls;
foreach my $pkg (@ARGV) {
my $tlp = $localtlpdb->get_package($pkg);
my $installed = 0;
@@ -450,6 +451,15 @@ sub action_show {
$tlp = $tlmediatlpdb->get_package($pkg);
} else {
$installed = 1;
+ @colls = $localtlpdb->needed_by($pkg);
+ if (!@colls) {
+ # not referenced in the local tlpdb, so try the remote here, too
+ if (!$tlmediatlpdb) {
+ init_tlmedia();
+ $tlmediatlpdb = $tlmediasrc->tlpdb;
+ }
+ @colls = $tlmediatlpdb->needed_by($pkg);
+ }
}
if ($tlp) {
print "Package: ", $tlp->name, "\n";
@@ -457,6 +467,7 @@ sub action_show {
print "ShortDesc: ", $tlp->shortdesc, "\n" if ($tlp->shortdesc);
print "LongDesc: ", $tlp->longdesc, "\n" if ($tlp->longdesc);
print "Installed: ", ($installed?"Yes\n":"No\n");
+ print "Collection:", @colls, "\n" if (@colls);
print "\n";
} else {
printf STDERR "Cannot find $pkg\n";