summaryrefslogtreecommitdiff
path: root/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-09-28 21:01:50 +0000
committerKarl Berry <karl@freefriends.org>2020-09-28 21:01:50 +0000
commitc1c6d73af9421082eecd62ac0b3760f97c87c43e (patch)
treecb38685b8f26985a209c256c8646f284401a701f /Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
parente6208354db843fb0d95197b86c0d4cddd8e7fd28 (diff)
texdef (28sep20)
git-svn-id: svn://tug.org/texlive/trunk@56466 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl')
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl40
1 files changed, 31 insertions, 9 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index c82c286d548..6cb2f0c34e6 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -1,12 +1,12 @@
#!/usr/bin/env perl
-# $Id: tlmgr.pl 56372 2020-09-18 05:52:26Z preining $
+# $Id: tlmgr.pl 56458 2020-09-27 22:20:18Z preining $
#
# Copyright 2008-2020 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
-my $svnrev = '$Revision: 56372 $';
-my $datrev = '$Date: 2020-09-18 07:52:26 +0200 (Fri, 18 Sep 2020) $';
+my $svnrev = '$Revision: 56458 $';
+my $datrev = '$Date: 2020-09-28 00:20:18 +0200 (Mon, 28 Sep 2020) $';
my $tlmgrrevision;
my $tlmgrversion;
my $prg;
@@ -1603,7 +1603,7 @@ sub action_info {
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|cat-contact-.*)$/) {
+ if ($d !~ m/^(name|category|localrev|remoterev|shortdesc|longdesc|size|installed|relocatable|depends|[lr]?cat-version|[lr]?cat-date|[lr]?cat-license|[lr]?cat-contact-.*)$/) {
tlwarn("unknown data field: $d\n");
return($F_ERROR);
}
@@ -3911,6 +3911,7 @@ sub show_one_package_json {
installed => ($is_installed ? TeXLive::TLUtils::True() : TeXLive::TLUtils::False()),
lrev => ($is_installed ? $loctlp->revision : 0),
rrev => ($is_available ? $remtlp->revision : 0),
+ rcataloguedata => ($is_available ? $remtlp->cataloguedata : {}),
revision => undef);
print $str;
return($F_OK);
@@ -3961,12 +3962,28 @@ sub show_one_package_csv {
push @out, ($tlp->relocated ? 1 : 0);
} elsif ($d eq "cat-version") {
push @out, ($tlp->cataloguedata->{'version'} || "");
+ } elsif ($d eq "lcat-version") {
+ push @out, ($is_installed ? ($loctlp->cataloguedata->{'version'} || "") : "");
+ } elsif ($d eq "rcat-version") {
+ push @out, ($is_available ? ($remtlp->cataloguedata->{'version'} || "") : "");
} elsif ($d eq "cat-date") {
push @out, ($tlp->cataloguedata->{'date'} || "");
+ } elsif ($d eq "lcat-date") {
+ push @out, ($is_installed ? ($loctlp->cataloguedata->{'date'} || "") : "");
+ } elsif ($d eq "rcat-date") {
+ push @out, ($is_available ? ($remtlp->cataloguedata->{'date'} || "") : "");
} elsif ($d eq "cat-license") {
push @out, ($tlp->cataloguedata->{'license'} || "");
+ } elsif ($d eq "lcat-license") {
+ push @out, ($is_installed ? ($loctlp->cataloguedata->{'license'} || "") : "");
+ } elsif ($d eq "rcat-license") {
+ push @out, ($is_available ? ($remtlp->cataloguedata->{'license'} || "") : "");
} elsif ($d =~ m/^cat-(contact-.*)$/) {
push @out, ($tlp->cataloguedata->{$1} || "");
+ } elsif ($d =~ m/^lcat-(contact-.*)$/) {
+ push @out, ($is_installed ? ($loctlp->cataloguedata->{$1} || "") : "");
+ } elsif ($d =~ m/^rcat-(contact-.*)$/) {
+ push @out, ($is_available ? ($remtlp->cataloguedata->{$1} || "") : "");
} elsif ($d eq "localrev") {
push @out, ($is_installed ? $loctlp->revision : 0);
} elsif ($d eq "remoterev") {
@@ -8332,10 +8349,15 @@ C<--only-installed> and C<--only-remote> cannot both be specified.
If the option C<--data> is given, its argument must be a comma separated
list of field names from: C<name>, C<category>, C<localrev>, C<remoterev>,
C<shortdesc>, C<longdesc>, C<installed>, C<size>, C<relocatable>, C<depends>,
-C<cat-version>, C<cat-date>, or C<cat-license>. In this case the requested
-packages' information is listed in CSV format one package per line, and the
-column information is given by the C<itemN>. The C<depends> column contains
-the name of all dependencies separated by C<:>.
+C<cat-version>, C<cat-date>, or C<cat-license>, and various C<cat-contact-*>
+fields. For the C<cat-> fields, there are two more variants with prefix C<l>
+and C<r>, that is C<lcat-version> and C<rcat-version> etc, which indicate
+the local and remote information, respectively. The variants without C<l> and
+C<r> show the most current one, that is normally the remote one.
+
+The requested packages' information is listed in CSV format one package per
+line, and the column information is given by the C<itemN>. The C<depends>
+column contains the name of all dependencies separated by C<:>.
=item B<--json>
@@ -10065,7 +10087,7 @@ This script and its documentation were written for the TeX Live
distribution (L<https://tug.org/texlive>) and both are licensed under the
GNU General Public License Version 2 or later.
-$Id: tlmgr.pl 56372 2020-09-18 05:52:26Z preining $
+$Id: tlmgr.pl 56458 2020-09-27 22:20:18Z preining $
=cut
# test HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html