aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xemi10
2 files changed, 10 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index f7a28b7..3dfc2dd 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@
- allow setting some env variables to define and default to
setting PERL_EXTUTILS_AUTOINSTALL and PERL_AUTOINSTALL to
--skipdeps
+- emi: allow setting per distro mandatory_arch
0.6.13
- use rpmbuild/ rather than rpm/
diff --git a/emi b/emi
index 491f034..512e469 100755
--- a/emi
+++ b/emi
@@ -192,7 +192,15 @@ foreach my $prefix (sort keys %pkg_tree) {
my $ok = 1;
foreach my $section (keys %{$pkg_tree{$prefix}{section}}) {
- my @wanted_archs = defined($pkg_tree{$prefix}{section}{$section}{arch}{noarch}) ? 'noarch' : @{$config->{mandatory_arch}};
+ 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 $path = $pkg_tree{$prefix}{section}{$section}{path};
my %missing;