[tex-live] Install failed on Windows 8 (*.win32 packages involved)
TANAKA Takuji
KXD02663 at nifty.ne.jp
Sat Apr 19 16:02:29 CEST 2014
Another candidate is attached.
(2014/04/19 19:40), TANAKA Takuji wrote:
> How about the attached patch?
>
> If you do not have the timing issue, it makes no delay and successfully opens the file.
> If you have, it tries 100 times with delay from 0.01sec to 1 sec.
>
> Takuji Tanaka
-------------- next part --------------
diff --git a/tests/TeXLive/TLUtils.pm b/tests/TeXLive/TLUtils.pm
index 7dbb4a7..4de5e47 100644
--- a/tests/TeXLive/TLUtils.pm
+++ b/tests/TeXLive/TLUtils.pm
@@ -200,6 +200,7 @@ use Cwd;
use Digest::MD5;
use Getopt::Long;
use File::Temp;
+use Time::HiRes;
use TeXLive::TLConfig;
@@ -1401,8 +1402,14 @@ sub install_packages {
# archives (.tar.xz) but at uncompressed-media install time we don't have them
my $tlpod = $totlpdb->root . "/tlpkg/tlpobj";
mkdirhier( $tlpod );
- open(TMP,">$tlpod/".$tlpobj->name.".tlpobj") ||
- die "$0: open tlpobj " . $tlpobj->name . "failed: $!";
+ my $count = 0;
+ while(1) {
+ open(TMP,">$tlpod/".$tlpobj->name.".tlpobj") && last;
+ Time::HiRes::sleep(0.01); # sleep 0.01 second
+ if ($count++==100){
+ die "$0: open tlpobj " . $tlpobj->name . "failed: $!";
+ }
+ }
$tlpobj->writeout(\*TMP);
close(TMP);
$donesize += $tlpsizes{$package};
More information about the tex-live
mailing list