diff options
-rwxr-xr-x | iurt2 | 30 |
1 files changed, 23 insertions, 7 deletions
@@ -372,7 +372,7 @@ my %config_usage = ( }, max_command_retry => { "Maximum number of retry Iurt will perform for a given command", - fault => 20 + default => 20 }, no_mail => { desc => 'Hash table with people mail address where we should not send any mails', @@ -646,7 +646,7 @@ if ($run{group}) { # -# +# The build loop # do { @@ -654,8 +654,8 @@ do { foreach (my $i ; $i < @{$run{todo}}; $i++) { my ($dir, $srpm, $status) = @{$run{todo}[$i]}; - # Set argv[0] (in the C sense) to something we can easily spot and - # understand when running ps --claudio + # CM: Set argv[0] (in the C sense) to something we can easily spot and + # understand when running ps $0 = "Iurt: $run{distro_tag} $run{my_arch} $run{media} $srpm"; $status or next; @@ -702,9 +702,17 @@ retry: $chroot_tmp, $dir, $srpm, $luser, $retry); if ($ret == -1) { $retry = 1; - goto retry + goto retry; } elsif (!$ret) { - next + # CM: experimental: fail if we can't regenerate the srpm + # This should eliminate bouncers that block the input queue + # + $srpm = $old_srpm; + $cache->{failure}{$srpm} = 1; + $run{status}{$srpm} = 'recreate_srpm_failure'; + dump_cache_par(\%run); + dump_status($local_spool, \%run); + next; } # only create the log dir for the new srpm mkdir "$local_spool/log/$srpm"; @@ -1244,12 +1252,19 @@ sub dump_status { } } +# +# CM: FIXME: should notify in case of recreate_srpm_failure +# + sub send_status_mail { my ($run, $config, $cache) = @_; - print "iurt compilation status\n"; my %output; + + print "iurt compilation status\n"; + foreach my $rpm (keys %{$run->{status}}) { next if $run->{status}{$rpm} =~ /ok|not_on_this_arch/; + if ($run->{status}{$rpm} eq 'missing_buildrequires') { foreach my $missing (keys %{$cache->{needed}{$rpm}}) { my $h = $cache->{needed}{$rpm}{$missing}; @@ -1273,6 +1288,7 @@ sub send_status_mail { next } } + my $text = "*** Missing buildrequires tag in specfile ***\n"; foreach my $maint (keys %{$output{buildrequires}}) { $text .= "\n$maint\n"; |