summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2011-06-07 01:16:36 +0000
committerNorbert Preining <preining@logic.at>2011-06-07 01:16:36 +0000
commit2c8f1a68ecaf07469e74bae19beec957ae98d23c (patch)
tree910099f1567c3a712ba1ba8aabc9f60b447ab7f0 /Master/tlpkg/TeXLive
parentf9d29393768faba07d693bb7812c428091cbae05 (diff)
try to make tlmgr work in paths containing spaces
git-svn-id: svn://tug.org/texlive/trunk@22842 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm11
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm3
2 files changed, 8 insertions, 6 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index 7ce95ce83ab..85e52cdc411 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -291,6 +291,7 @@ sub from_file {
}
$xzfile_quote = "\"$xzfile\"";
$tlpdbfile_quote = "\"$tlpdbfile\"";
+ my $xzdec = "\"$::progs{'xzdec'}\"";
debug("trying to download $path.xz to $xzfile\n");
my $ret = TeXLive::TLUtils::download_file("$path.xz", "$xzfile");
# better to check both, the return value AND the existence of the file
@@ -300,7 +301,7 @@ sub from_file {
# xzdec *hopefully* returns 0 on success and anything else on failure
# we don't have to negate since not zero means error in the shell
# and thus in perl true
- if (system("$::progs{'xzdec'} <$xzfile_quote >$tlpdbfile_quote")) {
+ if (system("$xzdec <$xzfile_quote >$tlpdbfile_quote")) {
debug("un-xzing $xzfile failed, tryin gplain file\n");
# to be sure we unlink the xz file and the tlpdbfile
unlink($xzfile);
@@ -1292,7 +1293,7 @@ sub _install_package {
# we assume that $::progs has been set up!
my $wget = $::progs{'wget'};
- my $xzdec = $::progs{'xzdec'};
+ my $xzdec = "\"$::progs{'xzdec'}\"";
if (!defined($wget) || !defined($xzdec)) {
tlwarn("_install_package: programs not set up properly, strange.\n");
return(0);
@@ -1334,12 +1335,12 @@ sub _install_package {
my $target_quote = $target;
if (win32()) {
$xzfile =~ s!/!\\!g;
- $xzfile_quote = "\"$xzfile\"";
$tarfile =~ s!/!\\!g;
- $tarfile_quote = "\"$tarfile\"";
$target =~ s!/!\\!g;
- $target_quote = "\"$target\"";
}
+ $xzfile_quote = "\"$xzfile\"";
+ $tarfile_quote = "\"$tarfile\"";
+ $target_quote = "\"$target\"";
if ($what =~ m,http://|ftp://,) {
# we are installing from the NET
# download the file and put it into temp
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index ad42a62b36b..40f47ac6950 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -1369,7 +1369,7 @@ sub install_package {
# we assume that $::progs has been set up!
my $wget = $::progs{'wget'};
- my $xzdec = $::progs{'xzdec'};
+ my $xzdec = "\"$::progs{'xzdec'}\"";
if (!defined($wget) || !defined($xzdec)) {
tlwarn("install_package: wget/xzdec programs not set up properly.\n");
return 0;
@@ -3318,6 +3318,7 @@ sub check_on_working_mirror
tlwarn ("check_on_working_mirror: Programs not set up, trying wget\n");
$wget = "wget";
}
+ $wget = "\"wget\"";
#
# the test is currently not completely correct, because we do not
# use the LWP if it is set up for it, but I am currently too lazy