summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPDB.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2016-05-14 00:31:00 +0000
committerNorbert Preining <preining@logic.at>2016-05-14 00:31:00 +0000
commitaaa3d6879a54492a4e73a1c485f5fc63aa1ea049 (patch)
treebb5132a1015f63a8e04a4ea127c1eea413785e7a /Master/tlpkg/TeXLive/TLPDB.pm
parentecc694f7532882098b662f8ccda8c810dc1ce53c (diff)
tempdir rework: use consistently tl_tmpdir/tmpfile for debugging
git-svn-id: svn://tug.org/texlive/trunk@41104 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index b82d747c2bb..de483db5803 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -97,8 +97,6 @@ use TeXLive::TLUtils qw(dirname mkdirhier member win32 info log debug ddebug
tlwarn basename download_file merge_into tldie);
use TeXLive::TLWinGoo;
-use File::Temp qw/tempfile/;
-
use Cwd 'abs_path';
my $_listdir;
@@ -307,7 +305,7 @@ sub from_file {
# on windows that doesn't work, so we close the fh immediately
# this creates a short loophole, but much better than before anyway
my $tlpdbfh;
- ($tlpdbfh, $tlpdbfile) = tempfile();
+ ($tlpdbfh, $tlpdbfile) = TeXLive::TLUtils::tl_tmpfile();
# same as above
close($tlpdbfh);
my $tlpdbfile_quote = $tlpdbfile;
@@ -319,7 +317,7 @@ sub from_file {
my $xz_succeeded = 0 ;
if (defined($::progs{'xzdec'})) {
# we first try the xz compressed file
- my ($xzfh, $xzfile) = tempfile();
+ my ($xzfh, $xzfile) = TeXLive::TLUtils::tl_tmpfile();
close($xzfh);
my $xzfile_quote = $xzfile;
if (win32()) {
@@ -434,10 +432,7 @@ sub from_file {
$self->{'verified'} = $is_verified;
- # remove the xzdec-ed tlpdb file from temp dir
- # THAT IS RACY!!! we should fix that in some better way with tempfile
close($retfh);
- unlink($tlpdbfile) if $tlpdbfile;
return($found);
}