texlive[48522] Master/texmf-dist/scripts/texlive/tlmgr.pl: tlmgr:

commits+preining at tug.org commits+preining at tug.org
Fri Aug 31 06:03:37 CEST 2018


Revision: 48522
          http://tug.org/svn/texlive?view=revision&revision=48522
Author:   preining
Date:     2018-08-31 06:03:37 +0200 (Fri, 31 Aug 2018)
Log Message:
-----------
tlmgr: report catalogue-contact in text/csv/json mode

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl

Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2018-08-31 03:41:21 UTC (rev 48521)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2018-08-31 04:03:37 UTC (rev 48522)
@@ -1575,7 +1575,7 @@
     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/) {
+      if ($d !~ m/^(name|category|localrev|remoterev|shortdesc|longdesc|size|installed|relocatable|depends|cat-version|cat-date|cat-license|cat-contact-.*)$/) {
         tlwarn("unknown data field: $d\n");
         return($F_ERROR);
       }
@@ -3919,6 +3919,8 @@
       push @out, ($tlp->cataloguedata->{'date'} || "");
     } elsif ($d eq "cat-license") {
       push @out, ($tlp->cataloguedata->{'license'} || "");
+    } elsif ($d =~ m/^cat-(contact-.*)$/) {
+      push @out, ($tlp->cataloguedata->{$1} || "");
     } elsif ($d eq "localrev") {
       push @out, ($is_installed ? $loctlp->revision : 0);
     } elsif ($d eq "remoterev") {
@@ -4117,6 +4119,10 @@
       }
     }
   }
+  # {
+  #   require Data::Dumper;
+  #   print Data::Dumper->Dump([\$tlp], [qw(tlp)]);
+  # }
   # some packages might depend on other packages, so do not
   # include arbitrary packages in the list of collections, but
   # only collections:
@@ -4190,6 +4196,12 @@
     if $tlp->cataloguedata->{'topics'};
   print "cat-related: ", $tlp->cataloguedata->{'also'}, "\n"
     if $tlp->cataloguedata->{'also'};
+  # print all the contact-* keys
+  for my $k (keys %{$tlp->cataloguedata}) {
+    if ($k =~ m/^contact-/) {
+      print "cat-$k: ", $tlp->cataloguedata->{$k}, "\n";
+    }
+  }
   print "collection:  ", @colls, "\n" if (@colls);
   if ($opts{"list"}) {
     if ($tlp->category eq "Collection" || $tlp->category eq "Scheme") {



More information about the tex-live-commits mailing list