texlive[45619] Master: move repository_to_array to TLUtils

commits+preining at tug.org commits+preining at tug.org
Fri Oct 27 07:26:02 CEST 2017


Revision: 45619
          http://tug.org/svn/texlive?view=revision&revision=45619
Author:   preining
Date:     2017-10-27 07:26:02 +0200 (Fri, 27 Oct 2017)
Log Message:
-----------
move repository_to_array to TLUtils

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

Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2017-10-27 04:42:58 UTC (rev 45618)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2017-10-27 05:26:02 UTC (rev 45619)
@@ -104,7 +104,7 @@
 use TeXLive::TLConfFile;
 use TeXLive::TLCrypto;
 TeXLive::TLUtils->import(qw(member info give_ctan_mirror win32 dirname
-                            mkdirhier copy debug tlcmp));
+                            mkdirhier copy debug tlcmp repository_to_array));
 use TeXLive::TLPaper;
 
 #
@@ -4154,30 +4154,6 @@
   }
   return "@ret";
 }
-sub repository_to_array {
-  my $r = shift;
-  my %r;
-  my @repos = split ' ', $r;
-  if ($#repos == 0) {
-    # only one repo, this is the main one!
-    $r{'main'} = $repos[0];
-    return %r;
-  }
-  for my $rr (@repos) {
-    my $tag;
-    my $url;
-    # decode spaces and % in reverse order
-    $rr =~ s/%20/ /g;
-    $rr =~ s/%25/%/g;
-    $tag = $url = $rr;
-    if ($rr =~ m/^([^#]+)#(.*)$/) {
-      $tag = $2;
-      $url = $1;
-    }
-    $r{$tag} = $url;
-  }
-  return %r;
-}
 sub merge_sub_packages {
   my %pkgs;
   for my $p (@_) {

Modified: trunk/Master/tlpkg/TeXLive/TLUtils.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLUtils.pm	2017-10-27 04:42:58 UTC (rev 45618)
+++ trunk/Master/tlpkg/TeXLive/TLUtils.pm	2017-10-27 05:26:02 UTC (rev 45619)
@@ -99,6 +99,7 @@
   TeXLive::TLUtils::mktexupd();
   TeXLive::TLUtils::setup_sys_user_mode($optsref,$tmfc, $tmfsc, $tmfv, $tmfsv);
   TeXLive::TLUtils::prepend_own_path();
+  TeXLive::TLUtils::repository_to_array($str);
 
 =head1 DESCRIPTION
 
@@ -186,6 +187,7 @@
     &nulldev
     &get_full_line
     &sort_archs
+    &repository_to_array
   );
   @EXPORT = qw(setup_programs download_file process_logging_options
                tldie tlwarn info log debug ddebug dddebug debug_hash
@@ -4131,6 +4133,33 @@
 
 =back
 =cut
+
+sub repository_to_array {
+  my $r = shift;
+  my %r;
+  my @repos = split ' ', $r;
+  if ($#repos == 0) {
+    # only one repo, this is the main one!
+    $r{'main'} = $repos[0];
+    return %r;
+  }
+  for my $rr (@repos) {
+    my $tag;
+    my $url;
+    # decode spaces and % in reverse order
+    $rr =~ s/%20/ /g;
+    $rr =~ s/%25/%/g;
+    $tag = $url = $rr;
+    if ($rr =~ m/^([^#]+)#(.*)$/) {
+      $tag = $2;
+      $url = $1;
+    }
+    $r{$tag} = $url;
+  }
+  return %r;
+}
+
+
 1;
 __END__
 



More information about the tex-live-commits mailing list