aboutsummaryrefslogtreecommitdiffstats
path: root/ulri
diff options
context:
space:
mode:
Diffstat (limited to 'ulri')
-rwxr-xr-xulri41
1 files changed, 19 insertions, 22 deletions
diff --git a/ulri b/ulri
index 7f61efb..aa6bf1f 100755
--- a/ulri
+++ b/ulri
@@ -322,6 +322,7 @@ foreach my $prefix (keys %pkg_tree) {
my $fail;
my $later;
+ my $done;
# Check if the build bot finished on the other side
#
@@ -338,18 +339,20 @@ foreach my $prefix (keys %pkg_tree) {
if ($r ne 'ok') {
plog('FAIL', "$r: $p");
$fail = 1;
+ } else {
+ plog('OK', "build complete: $p");
+ $done = 1;
}
}
- if (!$fail && !$later) {
+ if ($done) {
my @list = split "\n", sout($remote, "ls $prefix_dir");
my $error;
- my $done;
my $arch_check = join '|', $arch, if_($untranslated_arch{$arch}, @{$untranslated_arch{$arch}});
plog('MSG', "checking for $arch_check arch");
foreach my $result (@list) {
- $result =~ /\.(src|$arch_check|noarch)\.rpm$/ or next;
+ $result =~ /\.rpm$/ or next;
# do not copy the initial src package
$result =~ /^$prefix/ and next;
@@ -357,10 +360,6 @@ foreach my $prefix (keys %pkg_tree) {
my $result_file = "$done_dir/${prefix}_$result";
plog('OK', "build ok: $result");
- if ($result =~ /\.$arch_check\.rpm$/) {
- $done = 1;
- }
-
plog('DEBUG', "copy files to done");
make_path($done_dir);
if (sget($remote, "$prefix_dir/$result",
@@ -378,22 +377,20 @@ foreach my $prefix (keys %pkg_tree) {
}
next if $error;
- if ($done) {
- if (check_if_mandatory_arch_failed($media, $ent, $config)) {
- # Discard this arch as another mandatory one failed
- cleanup_failed_build($todo_dir, $done_dir, $fail_dir, $prefix, $ent, $media, $arch, $config);
- } else {
- create_file("$done_dir/${prefix}_$arch.done", "$bot $host");
- $pkg_tree{$prefix}{media}{$media}{done_arch}{$arch} = 1;
- make_path("$done_dir/$prefix");
- sget($remote, "$prefix_dir/log/*", "$done_dir/$prefix");
- $something_finished = 1;
- }
- # Either we already fetched the success logs, or don't care
- # as this success was discarded due to another failure.
- ssh($remote, "rm -rf $prefix_dir");
- next bot;
+ if (check_if_mandatory_arch_failed($media, $ent, $config)) {
+ # Discard this arch as another mandatory one failed
+ cleanup_failed_build($todo_dir, $done_dir, $fail_dir, $prefix, $ent, $media, $arch, $config);
+ } else {
+ create_file("$done_dir/${prefix}_$arch.done", "$bot $host");
+ $pkg_tree{$prefix}{media}{$media}{done_arch}{$arch} = 1;
+ make_path("$done_dir/$prefix");
+ sget($remote, "$prefix_dir/log/*", "$done_dir/$prefix");
+ $something_finished = 1;
}
+ # Either we already fetched the success logs, or don't care
+ # as this success was discarded due to another failure.
+ ssh($remote, "rm -rf $prefix_dir");
+ next bot;
}
make_path($fail_dir);