diff options
-rwxr-xr-x | ulri | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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 |