From 877ac4b055dcb50ec22775293eb59ab4ee1dea86 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 25 Aug 2010 16:14:54 +0000 Subject: 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) --- emi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'emi') 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"; -- cgit v1.2.1