aboutsummaryrefslogtreecommitdiffstats
path: root/emi
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2012-12-07 13:26:29 +0000
committerNicolas Vigier <boklm@mageia.org>2012-12-07 13:26:29 +0000
commit4cb04d7864faca4cbe845afacca68c76932b7470 (patch)
treeab4890f9cb0d24546e34402a09103e9757364c07 /emi
parentb32f8b77327c207d679d504e7e7be68787124771 (diff)
downloadiurt-4cb04d7864faca4cbe845afacca68c76932b7470.tar
iurt-4cb04d7864faca4cbe845afacca68c76932b7470.tar.gz
iurt-4cb04d7864faca4cbe845afacca68c76932b7470.tar.bz2
iurt-4cb04d7864faca4cbe845afacca68c76932b7470.tar.xz
iurt-4cb04d7864faca4cbe845afacca68c76932b7470.zip
emi: allow setting per distro mandatory_arch
emi is using $config->{mandatory_arch} to find the list of mandatory architectures with successful build required to upload a package. With this change it is now also possible to set per distro mandatory_arch in $config->{mandatory_arch}->{$distro}. If no mandatory architecture is defined for a distro, then $config->{mandatory_arch}->{default} is used.
Diffstat (limited to 'emi')
-rwxr-xr-xemi10
1 files changed, 9 insertions, 1 deletions
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;