diff options
author | Olivier Blin <oblin@mandriva.com> | 2010-08-25 16:14:54 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2010-08-25 16:14:54 +0000 |
commit | 877ac4b055dcb50ec22775293eb59ab4ee1dea86 (patch) | |
tree | db34c4d004e83b4e92537459b34acc229db06ad4 /emi | |
parent | 08154ddc2f25023cb8673b068a5915cfda653080 (diff) | |
download | iurt-877ac4b055dcb50ec22775293eb59ab4ee1dea86.tar iurt-877ac4b055dcb50ec22775293eb59ab4ee1dea86.tar.gz iurt-877ac4b055dcb50ec22775293eb59ab4ee1dea86.tar.bz2 iurt-877ac4b055dcb50ec22775293eb59ab4ee1dea86.tar.xz iurt-877ac4b055dcb50ec22775293eb59ab4ee1dea86.zip |
check for all mandatory archs if there is at least one arched package
(and not only if there is no noarch package, since now rpm can build
both noarch and arched from the same src package)
Diffstat (limited to 'emi')
-rwxr-xr-x | emi | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -184,10 +184,11 @@ foreach my $prefix (keys %pkg_tree) { plog('NOTIFY', "processing $prefix"); plog('DEBUG', "... in $path"); my $ok = 1; - foreach my $m (@{$config->{mandatory_arch}}, 'src') { + my $has_arched_packages = scalar(difference2([ keys %{$pkg_tree{$prefix}{arch}} ], [ qw(src noarch) ])); + foreach my $m (if_($has_arched_packages, @{$config->{mandatory_arch}}), 'src') { $excluded{$prefix}{$m} and next; my $x = "yes"; - if (!$pkg_tree{$prefix}{arch}{$m} && !$pkg_tree{$prefix}{arch}{noarch}) { + if (!$pkg_tree{$prefix}{arch}{$m}) { if (!$cache->{arch}{$prefix}{$m}) { $missing{$m} = 1; $x = "no"; |