diff options
author | Norbert Preining <preining@logic.at> | 2012-09-05 23:52:48 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2012-09-05 23:52:48 +0000 |
commit | 6cd1a45d57b066167f4a383721c93e732294edf5 (patch) | |
tree | fcd7033832c350f11f4201e422a5bff1aff87537 /Master/texmf/scripts | |
parent | c556c94cbf233fa607dc3ac6a664f23efba92c07 (diff) |
allow for spaces in repo path again
git-svn-id: svn://tug.org/texlive/trunk@27601 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts')
-rw-r--r-- | Master/texmf/scripts/texlive/NEWS | 3 | ||||
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 22 |
2 files changed, 18 insertions, 7 deletions
diff --git a/Master/texmf/scripts/texlive/NEWS b/Master/texmf/scripts/texlive/NEWS index bbc7ed0ea5f..cf9e0d5c4ba 100644 --- a/Master/texmf/scripts/texlive/NEWS +++ b/Master/texmf/scripts/texlive/NEWS @@ -1,6 +1,9 @@ (This file public domain. Originally written by Norbert Preining and Karl Berry, 2010.) +<p><b>tlmgr revision NEXT (released NNmmm12):</b><br> +<li>allow for spaces in the repository path (again) + <p><b>tlmgr revision 27413 (released 16aug12):</b><br> <li>fix Perl syntax warning in trans.pl <li><tt>tar -m</tt> in Windows update to avoid spurious problems diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 94621dbab38..e1d95ab0c25 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -3505,11 +3505,13 @@ sub array_to_repository { } for my $k (keys %r) { my $v = $r{$k}; - if ($k eq $v) { - push @ret, $k; - } else { - push @ret, "$v#$k"; + if ($k ne $v) { + $v = "$v#$k"; } + # encode spaces and % in the path and tags + $v =~ s/%/%25/g; + $v =~ s/ /%20/g; + push @ret, $v; } return "@ret"; } @@ -3523,11 +3525,17 @@ sub repository_to_array { 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/^([^#]+)#(.*)$/) { - $r{$2} = $1; - } else { - $r{$rr} = $rr; + $tag = $2; + $url = $1; } + $r{$tag} = $url; } return %r; } |