diff options
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 9fae70ff4a4..e0c76b40e8e 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -1120,6 +1120,8 @@ sub install_package { my @filelist = @$filelistref; + my $tempdir = "$target/temp"; + # we assume that $::progs has been set up! my $wget = $::progs{'wget'}; my $xzdec = $::progs{'xzdec'}; @@ -1144,14 +1146,17 @@ sub install_package { # one), xzdec them, and then call tar # if we are unpacking a relocated container we adjust the target - $target .= "/$TeXLive::TLConfig::RelocTree" if $reloc; + if ($reloc) { + $target .= "/$TeXLive::TLConfig::RelocTree" if $reloc; + mkdir($target) if (! -d $target); + } my $fn = basename($what); my $pkg = $fn; $pkg =~ s/\.tar\.xz$//; - mkdirhier("$target/temp"); - my $xzfile = "$target/temp/$fn"; - my $tarfile = "$target/temp/$fn"; $tarfile =~ s/\.xz$//; + mkdirhier("$tempdir"); + my $xzfile = "$tempdir/$fn"; + my $tarfile = "$tempdir/$fn"; $tarfile =~ s/\.xz$//; my $xzfile_quote = $xzfile; my $tarfile_quote = $tarfile; if (win32()) { @@ -1214,7 +1219,7 @@ sub install_package { } else { # we are installing from CD # copy it to temp - copy($what, "$target/temp"); + copy($what, $tempdir); } } debug("un-xzing $xzfile to $tarfile\n"); |