diff options
author | Pascal Terjan <pterjan@mageia.org> | 2012-12-10 20:50:39 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2012-12-10 20:50:39 +0000 |
commit | bed156f5d827991658f8c81cd9e698818ae701e6 (patch) | |
tree | 9a8a785250e1d058cc7d292b71817eeadfea9ce0 | |
parent | 99036913c0dd64975c23c2595bd18fc7b328c563 (diff) | |
download | iurt-bed156f5d827991658f8c81cd9e698818ae701e6.tar iurt-bed156f5d827991658f8c81cd9e698818ae701e6.tar.gz iurt-bed156f5d827991658f8c81cd9e698818ae701e6.tar.bz2 iurt-bed156f5d827991658f8c81cd9e698818ae701e6.tar.xz iurt-bed156f5d827991658f8c81cd9e698818ae701e6.zip |
Factorize dump_status/dump_cache_par calls
-rwxr-xr-x | iurt | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -833,8 +833,6 @@ sub rebuild_one { unless (-f "$dir/$srpm") { $cache->{failure}{$srpm} = 1; $run{status}{$srpm} = 'missing'; - dump_cache_par(\%run); - dump_status($local_spool, \%run); return; } # FIXME unfortunately urpmi stalls quite often @@ -892,8 +890,6 @@ retry: $srpm = $old_srpm; $cache->{failure}{$srpm} = 1; $run{status}{$srpm} = 'recreate_srpm_failure'; - dump_cache_par(\%run); - dump_status($local_spool, \%run); return; } @@ -992,9 +988,6 @@ retry: $cache->{failure}{$srpm} = 1; $run{status}{$srpm} = 'build_failure'; - # 20060615 - dump_cache_par(\%run); - dump_status($local_spool, \%run); return; } @@ -1049,9 +1042,6 @@ retry: } process_queue($config, \%run, \@wrong_rpm, 1); } - dump_status($local_spool, \%run); - # dump_cache each time so that concurrent process can get updated - dump_cache_par(\%run) if $run{concurrent_run}; return 1; } @@ -1096,12 +1086,16 @@ do { } elsif ($pid == 0) { #child $chroot_tmp .= "_" . int($i); rebuild_one($dir, $srpm, $status); + dump_cache_par(\%run); + dump_status($local_spool, \%run); exit; } else { die "could not fork"; } } else { rebuild_one($dir, $srpm, $status); + dump_cache_par(\%run); + dump_status($local_spool, \%run); } } if ($run{parallel}) { |