summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-05-07 17:34:34 +0000
committerNorbert Preining <preining@logic.at>2009-05-07 17:34:34 +0000
commitf42595ee89ab01ca5e5a920b864231ef0d483273 (patch)
tree094330082834b34925d94a3ed63c0842d1f43309
parent6934cd8973be885b53875e856adfcd2efa057613 (diff)
use unified $tempdir also when installing
git-svn-id: svn://tug.org/texlive/branches/branch2009-dev@12989 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm15
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");