summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2017-12-01 00:16:32 +0000
committerNorbert Preining <preining@logic.at>2017-12-01 00:16:32 +0000
commite7ae14141c41671d4a4b32cecf36f86f09fd9573 (patch)
tree51d58b6130d20e900be3101c3b8465a9a9e35a6a /Master/texmf-dist
parent84e7e267840191e1744e3be02017373f54165a9f (diff)
tlmgr info --data --only-installed: don't load remote
git-svn-id: svn://tug.org/texlive/trunk@45957 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl21
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);