diff options
-rwxr-xr-x | emi | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -117,6 +117,7 @@ my $reject = "$config->{queue}/rejected"; my %pkg_tree; my %excluded; +my %archdone; # @@ -128,17 +129,9 @@ sub done_func { my $section = "$m/$s"; - if ($r =~ /(\d{14}\.\w+\.\w+\.\d+)_(.*\.([^.]+)\.rpm)$/) { - my ($prefix, $rpm, $arch) = ($1, $2, $3); - $arch = $config->{arch_translation}{$arch} if $config->{arch_translation}{$arch}; - plog('DEBUG', "found rpm $rpm ($prefix) for section $section"); - $pkg_tree{$prefix}{target} = $f; - $pkg_tree{$prefix}{section}{$section}{path} = "/$f/$m/$s"; - if ($arch eq 'src') { - push @{$pkg_tree{$prefix}{section}{$section}{srpms}}, $rpm; - $pkg_tree{$prefix}{section}{$section}{arch}{src} = 1; - } - push @{$pkg_tree{$prefix}{section}{$section}{rpms}} , $rpm; + if ($r =~ /(\d{14}\.\w+\.\w+\.\d+)_(.*)\.done$/) { + my ($prefix, $arch) = ($1, $2); + $archdone{$prefix}{$section}{$arch} = 1; } elsif ($r =~ /(\d{14}\.\w+\.\w+\.\d+)_(.*)\.excluded$/) { my ($prefix, $arch) = ($1, $2); $arch = $config->{arch_translation}{$arch} if $config->{arch_translation}{$arch}; @@ -150,12 +143,19 @@ sub done_func { sub done_post { my ($_todo, $f, $m, $s, $r) = @_; my $section = "$m/$s"; - if ($r =~ /(\d{14}\.\w+\.\w+\.\d+)_(.*)\.done$/) { - my ($prefix, $arch) = ($1, $2); - if (defined($pkg_tree{$prefix})) { - plog('DEBUG', "found .done ($prefix, $arch)"); + if ($r =~ /(\d{14}\.\w+\.\w+\.\d+)_(.*\.([^.]+)\.rpm)$/) { + my ($prefix, $rpm, $arch) = ($1, $2, $3); + $arch = $config->{arch_translation}{$arch} if $config->{arch_translation}{$arch}; + plog('DEBUG', "found rpm $rpm ($prefix) for section $section"); + $pkg_tree{$prefix}{target} = $f; + $pkg_tree{$prefix}{section}{$section}{path} = "/$f/$m/$s"; + if ($arch eq 'src') { + push @{$pkg_tree{$prefix}{section}{$section}{srpms}}, $rpm; + $pkg_tree{$prefix}{section}{$section}{arch}{src} = 1; + } elsif ($archdone{$prefix}{$section}{$arch}) { $pkg_tree{$prefix}{section}{$section}{arch}{$arch} = 1; } + push @{$pkg_tree{$prefix}{section}{$section}{rpms}} , $rpm; } } |