From dbb4267e2c8eed73bf7d1fd538755104f3bf7234 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Fri, 11 Jan 2013 00:35:32 +0000 Subject: Do not mark an arch done until all files are copied --- ulri | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ulri b/ulri index 744b04a..7ca84e6 100755 --- a/ulri +++ b/ulri @@ -376,7 +376,6 @@ foreach my $prefix (keys %pkg_tree) { $result =~ /^$prefix/ and next; my $result_file = "$done_dir/${prefix}_$result"; - my $done_file = "$done_dir/${prefix}_$arch.done"; plog('OK', "build ok: $result"); if ($result =~ /\.$arch_check\.rpm$/) { @@ -390,14 +389,18 @@ foreach my $prefix (keys %pkg_tree) { plog('ERROR', "copying $result from $host failed ($!)"); $error = 1; last; - } elsif (move("$result_file.new", $result_file)) { - if ($done) { - create_file($done_file, "$bot $host"); - $success = 1; - } + } + if (!move("$result_file.new", $result_file)) { + $error = 1; + last; } } next if $error; + + if ($done) { + create_file("$done_dir/${prefix}_$arch.done", "$bot $host"); + $success = 1; + } if ($success) { # Fetch build log and clean remote machine -- cgit v1.2.1