diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | lib/Iurt/Emi.pm | 3 | ||||
-rwxr-xr-x | ulri | 41 |
3 files changed, 23 insertions, 23 deletions
@@ -1,6 +1,8 @@ - iurt: record the list of generated packages - iurt: allow generated src.rpm to have a different name, some packages use macros for Name and those can change based on the distro version. +- ulri: rely on status.log to know a build completed rather than having + packages of the right architecture. 0.7.16 - iurt: use --target noarch for noarch packages rather than the arch used to diff --git a/lib/Iurt/Emi.pm b/lib/Iurt/Emi.pm index ee87526..bf76a64 100644 --- a/lib/Iurt/Emi.pm +++ b/lib/Iurt/Emi.pm @@ -152,7 +152,8 @@ sub upload_prefix_in_media { plog('OK', " uploading $rpm in $done/$path"); } - # This should not happen :( + # When a package is not marked as noarch but only has noarch subpackages, there will be nothing + # left to upload when it finishes building on non mandaory arch. return unless @packages; my $command = generate_upload_command($prefix, $media, $target, $user, \@packages, $o_finish, "$done$path/$youri_file"); @@ -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); |