diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-12-07 13:38:35 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-12-07 13:38:35 +0000 |
commit | c5f7d5810481f12c8d876b69e0a37353bdd76c83 (patch) | |
tree | 128eba62eb8041adf22e256f84d0ed2574dfb7f7 /emi | |
parent | 72d6945e459fc45db2eb2b834d43ac1b81f7a1d3 (diff) | |
download | iurt-c5f7d5810481f12c8d876b69e0a37353bdd76c83.tar iurt-c5f7d5810481f12c8d876b69e0a37353bdd76c83.tar.gz iurt-c5f7d5810481f12c8d876b69e0a37353bdd76c83.tar.bz2 iurt-c5f7d5810481f12c8d876b69e0a37353bdd76c83.tar.xz iurt-c5f7d5810481f12c8d876b69e0a37353bdd76c83.zip |
simplify
Diffstat (limited to 'emi')
-rwxr-xr-x | emi | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -192,15 +192,9 @@ foreach my $prefix (sort keys %pkg_tree) { my $ok = 1; foreach my $section (keys %{$pkg_tree{$prefix}{section}}) { - my $mandatory_arch = []; - if (ref $config->{mandatory_arch} eq 'ARRAY') { - $mandatory_arch = $config->{mandatory_arch}; - } elsif (ref $config->{mandatory_arch}->{$target} eq 'ARRAY') { - $mandatory_arch = $config->{mandatory_arch}->{$target}; - } elsif (ref $config->{mandatory_arch}->{default} eq 'ARRAY') { - $mandatory_arch = $config->{mandatory_arch}->{default}; - } - my @wanted_archs = defined($pkg_tree{$prefix}{section}{$section}{arch}{noarch}) ? 'noarch' : @{$mandatory_arch}; + my $mandatory_arch = find { ref($_) eq 'ARRAY' } $config->{mandatory_arch}, + $config->{mandatory_arch}{$target}, $config->{mandatory_arch}{default}, []; + my @wanted_archs = defined($pkg_tree{$prefix}{section}{$section}{arch}{noarch}) ? 'noarch' : @$mandatory_arch; my $path = $pkg_tree{$prefix}{section}{$section}{path}; my %missing; |