diff options
author | Claudio Matsuoka <claudio@mandriva.com> | 2006-11-12 13:21:47 +0000 |
---|---|---|
committer | Claudio Matsuoka <claudio@mandriva.com> | 2006-11-12 13:21:47 +0000 |
commit | f0d6982373029612007959d308bf7545f136034b (patch) | |
tree | d95e04d81a2a00ba226c9210421778a5448138fd | |
parent | 44e18953d6fbc0236e674dba9efbceb9ea72c640 (diff) | |
download | iurt-f0d6982373029612007959d308bf7545f136034b.tar iurt-f0d6982373029612007959d308bf7545f136034b.tar.gz iurt-f0d6982373029612007959d308bf7545f136034b.tar.bz2 iurt-f0d6982373029612007959d308bf7545f136034b.tar.xz iurt-f0d6982373029612007959d308bf7545f136034b.zip |
Add reminder to notify user in case of srpm recreation error
-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"; |