From bac22ce1f385ca8e3fea32f2164cbe1dd56393bc Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 6 Jan 2016 04:20:44 +0000 Subject: add win32 open prevention to TLPDB as for TLUtils git-svn-id: svn://tug.org/texlive/trunk@39287 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPDB.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Master') 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); -- cgit v1.2.3