summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2017-10-27 05:26:02 +0000
committerNorbert Preining <preining@logic.at>2017-10-27 05:26:02 +0000
commitbd41846f4f09f09f3bcc3efa0f49795a63461035 (patch)
treeb345c68b4e4fc6abbd44735c085b151e13bbb47b /Master
parenta2ab612198d3b8adcf19a9deb382dfe503c09e0d (diff)
move repository_to_array to TLUtils
git-svn-id: svn://tug.org/texlive/trunk@45619 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl26
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm29
2 files changed, 30 insertions, 25 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index b8cbef168ae..e906af35ee6 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -104,7 +104,7 @@ use TeXLive::TLDownload;
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 @@ sub array_to_repository {
}
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 (@_) {
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index f3767b7889a..3e63b4a2c08 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -99,6 +99,7 @@ C<TeXLive::TLUtils> -- utilities used in TeX Live infrastructure
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 @@ BEGIN {
&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 @@ sub prepend_own_path {
=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__