diff options
author | Norbert Preining <preining@logic.at> | 2017-09-12 00:47:29 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2017-09-12 00:47:29 +0000 |
commit | 1d59272d3a22556be28be08cbbcd140f23db9554 (patch) | |
tree | bfcfa2b9dc110de00d9c85486e94661d4542da1d /Master/texmf-dist | |
parent | fcb702b3b3560b24816537701d7d557d801e031f (diff) |
fixing tlmgr info output for unknown packages
git-svn-id: svn://tug.org/texlive/trunk@45275 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 56 |
1 files changed, 25 insertions, 31 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 468ce13a793..17fc2bbc4e4 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -3702,9 +3702,9 @@ sub show_one_package_detail { print "installed: No\n"; return($F_OK); } - #if (!$remotetlpdb) { - # init_tlmedia_or_die(); - #} + if (!$remotetlpdb) { + init_tlmedia_or_die(1); + } if (defined($tag)) { if (!$remotetlpdb->is_virtual) { tlwarn("$prg: specifying implicit tags not allowed for non-virtual databases!\n"); @@ -3724,40 +3724,34 @@ sub show_one_package_detail { tlwarn("$prg: Cannot find package $pkg in repository $tag\n"); return($F_WARNING); } - if ($remotetlpdb->is_virtual) { + my @cand = $remotetlpdb->candidates($pkg); + if (@cand) { + # if @cand is not empty, then we have a virtual database # we might have a package that is available in a # subsidiary repository, but not installable # because it is not pinned # we will list it but warn about this fact - my @cand = $remotetlpdb->candidates($pkg); - if (@cand) { - my $first = shift @cand; - if (defined($first)) { - tlwarn("$prg: strange, we have a first candidate but no tlp: $pkg\n"); - return($F_WARNING); - } - # already shifted away the first element - if ($#cand >= 0) { - # recursively showing all tags, but warn - print "package: ", $pkg, "\n"; - print "WARNING: This package is not pinned but present in subsidiary repositories\n"; - print "WARNING: As long as it is not pinned it is not installable.\n"; - print "WARNING: Listing all available copies of the package.\n"; - my @aaa; - for my $a (@cand) { - my ($t,$r) = split(/\//, $a, 2); - push @aaa, "$pkg" . '@' . $t; - } - $ret |= action_info(@aaa); - return($ret); - } else { - tlwarn("$prg: strange, package listed but no residual candidates: $pkg\n"); - return($F_WARNING); - } - } else { - tlwarn("$prg: strange, package listed but no candidates: $pkg\n"); + # useless test, @cand will always be defined becuase $remotetlpdb is virtual + my $first = shift @cand; + if (defined($first)) { + tlwarn("$prg: strange, we have a first candidate but no tlp: $pkg\n"); return($F_WARNING); } + # already shifted away the first element + if ($#cand >= 0) { + # recursively showing all tags, but warn + print "package: ", $pkg, "\n"; + print "WARNING: This package is not pinned but present in subsidiary repositories\n"; + print "WARNING: As long as it is not pinned it is not installable.\n"; + print "WARNING: Listing all available copies of the package.\n"; + my @aaa; + for my $a (@cand) { + my ($t,$r) = split(/\//, $a, 2); + push @aaa, "$pkg" . '@' . $t; + } + $ret |= action_info(@aaa); + return($ret); + } } # we didn't find a package like this, so use search info("$prg: cannot find package $pkg, searching for other matches:\n"); |