[tex-live] Install failed on Windows 8 (*.win32 packages involved)

TANAKA Takuji KXD02663 at nifty.ne.jp
Sat Apr 19 11:33:22 CEST 2014


How about the attached patch?

If you do not have the timing issue, that makes no delay and successfully open the file.
If you have, try 100 times with delay from 0.01sec to 1 sec.

Takuji Tanaka

(2014/02/25 19:05), Siep Kroonenberg wrote:
> On Tue, Feb 25, 2014 at 10:46:09AM +0100, Denis Bitouzé wrote:
>> Le mardi 25/02/14 à 09h51,
>> Siep Kroonenberg <siepo at cybercomm.nl> a écrit :
>>
>>> On Windows, I have run into timing problems before.
>> Okay. What is strange is that on this (recent hence supposed fast) PC,
>> the estimated time of the TL install, before this extra sleep was added,
>> was rather long (at the beginning of the process): about 55 minutes.
>>
>>> But there is a more fine-grained timer module, which is included in
>>> w32 TL perl. From
>>> http://stackoverflow.com/questions/896904/how-do-i-sleep-for-a-millisecond-in-perl
>>>
>>> ###
>>>
>>> use Time::HiRes qw(usleep nanosleep);
>>>
>>> # 1 millisecond == 1000 microseconds
>>> usleep(1000);
>>>
>>> ###
>> Do you mean one extra millisecond would be enough in most cases and
>> could added in the installer?
> I am just quoting the web page. I just remember that we already use
> delays when deleting registry keys recursively. These are delays of
> 20000 microseconds i.e. 0.02 second. Unfortunately, this did not
> help. I doubt whether it was a timing problem at all.
>

-------------- next part --------------
diff --git a/tests/TeXLive/TLUtils.pm b/tests/TeXLive/TLUtils.pm
index 7dbb4a7..fae9712 100644
--- a/tests/TeXLive/TLUtils.pm
+++ b/tests/TeXLive/TLUtils.pm
@@ -1401,8 +1401,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;
+      select undef, undef, undef, 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