diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-12-11 09:03:38 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-12-11 09:03:38 +0000 |
commit | 89089f2ac8633769596249e2a0f6981de1559225 (patch) | |
tree | 070a730b44bf013f77f8205cf41dab566cabb312 | |
parent | 255b3461ad633b53c6c42b5403ac5db56e3f11bc (diff) | |
download | iurt-89089f2ac8633769596249e2a0f6981de1559225.tar iurt-89089f2ac8633769596249e2a0f6981de1559225.tar.gz iurt-89089f2ac8633769596249e2a0f6981de1559225.tar.bz2 iurt-89089f2ac8633769596249e2a0f6981de1559225.tar.xz iurt-89089f2ac8633769596249e2a0f6981de1559225.zip |
simplify like emi was
-rwxr-xr-x | ulri | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -542,14 +542,8 @@ foreach my $prefix (sort keys %pkg_tree) { # count noarch todos only once even if searching multiple bots my $noarch_countflag = 0; - my @arch_list = keys %{$config->{bot}}; - if (ref $config->{arch} eq 'ARRAY') { - @arch_list = @{$config->{arch}}; - } elsif (ref $config->{arch}{$target} eq 'ARRAY') { - @arch_list = @{$config->{arch}{$target}}; - } elsif (ref $config->{arch}{default} eq 'ARRAY') { - @arch_list = @{$config->{arch}{default}}; - } + my $arch_list = find { ref($_) eq 'ARRAY' } $config->{arch}, $config->{arch}{$target}, $config->{arch}{default}; + my @arch_list = $arch_list ? @$arch_list : keys %{$config->{bot}}; # need to find a bot for each arch foreach my $arch (@arch_list) { |