aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2010-08-25 16:14:54 +0000
committerOlivier Blin <oblin@mandriva.com>2010-08-25 16:14:54 +0000
commit877ac4b055dcb50ec22775293eb59ab4ee1dea86 (patch)
treedb34c4d004e83b4e92537459b34acc229db06ad4
parent08154ddc2f25023cb8673b068a5915cfda653080 (diff)
downloadiurt-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)
-rwxr-xr-xemi5
1 files changed, 3 insertions, 2 deletions
diff --git a/emi b/emi
index c3c3660..f499627 100755
--- a/emi
+++ b/emi
@@ -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";