From 33cf01394dbfd8fdd8e7a84b2dd708f0747567a8 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Mon, 10 Dec 2012 20:50:45 +0000 Subject: Get shared code out of rebuild_one --- iurt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/iurt b/iurt index 525c44e..c2ccebc 100755 --- a/iurt +++ b/iurt @@ -766,12 +766,6 @@ sub rebuild_one { # understand in process list $0 = "Iurt: $run{distro_tag} $run{my_arch} $run{media} $srpm"; - $status or return; - $done{$srpm} and return; - $done{$srpm} = 1; - check_version(\%run, $srpm, \%srpm_version) or return; - if ($run{debug}) { $run{debug}++ == 2 and exit() } - $done++; plog('NOTIFY', "Build package $srpm [$done/$to_compile]"); # When rebuilding all the media, src.rpm can be removed from mirror before we work on them unless (-f "$dir/$srpm") { @@ -999,6 +993,11 @@ do { my %children; for ($i; $i < @{$run{todo}}; $i++) { my ($dir, $srpm, $status) = @{$run{todo}[$i]}; + $done{$srpm} and next; + $done{$srpm} = 1; + check_version(\%run, $srpm, \%srpm_version) or next; + if ($run{debug}) { $run{debug}++ == 2 and exit() } + $done++; if ($run{parallel}) { my $pid; # First cleanup all the finished ones -- cgit v1.2.1