diff options
author | Norbert Preining <preining@logic.at> | 2016-01-06 04:20:44 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2016-01-06 04:20:44 +0000 |
commit | bac22ce1f385ca8e3fea32f2164cbe1dd56393bc (patch) | |
tree | 20f2009a85b41866fc31cbcc544ab37ec9905b98 /Master/tlpkg/TeXLive/TLPDB.pm | |
parent | d812ffd4c5dc1b89dcf9593b8e426ab3a33b90a8 (diff) |
add win32 open prevention to TLPDB as for TLUtils
git-svn-id: svn://tug.org/texlive/trunk@39287 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 48fa71408dc..134b4f4360b 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -1612,8 +1612,13 @@ sub not_virtual_install_package { # archives (.tar.xz) but at DVD install time we don't have them my $tlpod = $totlpdb->root . "/tlpkg/tlpobj"; mkdirhier( $tlpod ); - open(TMP,">$tlpod/".$tlpobj->name.".tlpobj") or - die("Cannot open tlpobj file for ".$tlpobj->name); + my $count = 0; + until (open(TMP,">$tlpod/".$tlpobj->name.".tlpobj")) { + # The open might fail for no good reason on Windows. + # Try again for a while, but not forever. + if ($count++ == 100) { die "$0: open($tlpobj_file) failed: $!"; } + select (undef, undef, undef, .1); # sleep briefly + } $tlpobj->writeout(\*TMP); close(TMP); $totlpdb->add_tlpobj($tlpobj); |