solenv/bin/build.pl | 8 ++++++++ 1 file changed, 8 insertions(+) New commits: commit 09789b58d70cb9a7c9d33c5bf3a1255ce96124b6 Author: Norbert Thiebaud <nthieb...@gmail.com> Date: Fri Sep 23 03:39:41 2011 -0500
add a retry loop in build.pl on Error 126 on Windows. diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 93a6952..d402092 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -1808,6 +1808,8 @@ sub run_job { my ($job, $path, $registered_name) = @_; my $job_to_do = $job; my $error_code = 0; + my $retry_counter = 10; + print "$registered_name\n"; return 0 if ( $show ); $job_to_do = $deliver_command if ($job eq 'deliver'); @@ -1830,6 +1832,7 @@ sub run_job { system("$perl $mkout"); }; } +RETRY: open (MAKE, "$job_to_do 2>&1 |") or return 8; open (LOGFILE, "> $log_file") or return 8; while (<MAKE>) { print LOGFILE $_; print $_ } @@ -1838,6 +1841,11 @@ sub run_job { close LOGFILE; if ( $error_code != 0) { + if ($ENV{GUI} eq 'WIN' && $retry_counter > 0) + { + $retry_counter -= 1; + system('grep "Error 126\$"') && goto RETRY; + } system("echo \"log for $path\" >> $build_error_log"); system("cat $log_file >> $build_error_log"); } _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits