diff options
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 73662615f9b..caba3ae8858 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -1514,16 +1514,23 @@ sub action_info { # output format is changed to csv with " as quotes # we need to determine the fields @datafields = split(',', $opts{'data'}); - # check for correctness of data fields + # check for correctness of data fields and whether remote is necessary + my $load_remote = 0; for my $d (@datafields) { + $load_remote = 1 if ($d eq "remoterev"); if ($d !~ m/name|category|localrev|remoterev|shortdesc|longdesc|size|installed|relocatable|depends|cat-version|cat-date|cat-license/) { tlwarn("unknown data field: $d\n"); return($F_ERROR); } } $fmt = "csv"; - # the 1 is the silent mode! - init_tlmedia_or_die(1); + if ($load_remote) { + if ($opts{"only-installed"}) { + tlwarn("requesting only-installed with data field remoterev, loading remote anyway!\n"); + $opts{"only-installed"} = 0; + } + # loading of tlpdb is done below + } } else { $fmt = "detail"; } @@ -3774,11 +3781,15 @@ sub show_one_package_csv { my ($p, @datafields) = @_; my @out; my $loctlp = $localtlpdb->get_package($p); - my $remtlp = $remotetlpdb->get_package($p); + my $remtlp = $remotetlpdb->get_package($p) unless ($opts{'only-installed'}); my $is_installed = (defined($loctlp) ? 1 : 0); my $is_available = (defined($remtlp) ? 1 : 0); if (!($is_installed || $is_available)) { - tlwarn("$prg: package $p not found neither locally nor remote!\n"); + if ($opts{'only-installed'}) { + tlwarn("$prg: package $p not locally!\n"); + } else { + tlwarn("$prg: package $p not found neither locally nor remote!\n"); + } return($F_WARNING); } my $tlp = ($is_installed ? $loctlp : $remtlp); |