texlive[51110] Master: support tlmgr repository status, format will

commits+preining at tug.org commits+preining at tug.org
Mon May 13 01:29:40 CEST 2019


Revision: 51110
          http://tug.org/svn/texlive?view=revision&revision=51110
Author:   preining
Date:     2019-05-13 01:29:40 +0200 (Mon, 13 May 2019)
Log Message:
-----------
support tlmgr repository status, format will change, docs missing

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
    trunk/Master/tlpkg/TeXLive/TLPDB.pm

Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2019-05-12 22:20:44 UTC (rev 51109)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2019-05-12 23:29:40 UTC (rev 51110)
@@ -4545,6 +4545,21 @@
     $localtlpdb->save;
     return ($F_OK);
   }
+  if ($what eq "status") {
+    if (!defined($remotetlpdb)) {
+      init_tlmedia_or_die();
+    }
+    if (!$remotetlpdb->is_virtual) {
+      print "main: ", $remotetlpdb->location, ", verification status: ", $remotetlpdb->is_verified, "\n";
+      return ($F_OK);
+    } else {
+      for my $t ($remotetlpdb->virtual_get_tags()) {
+        my $tlpdb = $remotetlpdb->virtual_get_tlpdb($t);
+        print "$t: ", $tlpdb->location, ", verification status: ", $tlpdb->is_verified, "\n";
+      }
+      return($F_OK);
+    }
+  }
   # we are still here, unknown command to repository
   tlwarn("$prg: unknown subaction for tlmgr repository: $what\n");
   return ($F_ERROR);

Modified: trunk/Master/tlpkg/TeXLive/TLPDB.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLPDB.pm	2019-05-12 22:20:44 UTC (rev 51109)
+++ trunk/Master/tlpkg/TeXLive/TLPDB.pm	2019-05-12 23:29:40 UTC (rev 51110)
@@ -79,6 +79,7 @@
   $tlpdb->is_virtual;
   $tlpdb->virtual_add_tlpdb($tlpdb, $tag);
   $tlpdb->virtual_remove_tlpdb($tag);
+  $tlpdb->virtual_get_tags();
   $tlpdb->virtual_get_tlpdb($tag);
   $tlpdb->virtual_get_package($pkg, $tag);
   $tlpdb->candidates($pkg);
@@ -2561,6 +2562,11 @@
   return 1;
 }
 
+sub virtual_get_tags {
+  my $self = shift;
+  return keys %{$self->{'tlpdbs'}};
+}
+
 sub virtual_get_tlpdb {
   my ($self, $tag) = @_;
   if (!$self->is_virtual) {



More information about the tex-live-commits mailing list