aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <dev@blino.org>2015-11-08 23:59:29 +0100
committerOlivier Blin <dev@blino.org>2015-11-17 00:11:40 +0100
commit2cafdf6269c73d980f5a6491fccc321e101283d6 (patch)
tree860887ad9455414b0901124c564a4df59150fed6 /lib
parent497c1565e90d4587b2fdc3cd69f69c3e55570988 (diff)
downloadiurt-2cafdf6269c73d980f5a6491fccc321e101283d6.tar
iurt-2cafdf6269c73d980f5a6491fccc321e101283d6.tar.gz
iurt-2cafdf6269c73d980f5a6491fccc321e101283d6.tar.bz2
iurt-2cafdf6269c73d980f5a6491fccc321e101283d6.tar.xz
iurt-2cafdf6269c73d980f5a6491fccc321e101283d6.zip
Extract get_mandatory_arch helper
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Config.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Iurt/Config.pm b/lib/Iurt/Config.pm
index a1a1e84..7b07d7a 100644
--- a/lib/Iurt/Config.pm
+++ b/lib/Iurt/Config.pm
@@ -20,6 +20,7 @@ our @EXPORT = qw(
check_arch
check_noarch
get_package_prefix
+ get_mandatory_arch
%arch_comp
);
@@ -180,4 +181,10 @@ sub check_arch {
return 1;
}
+sub get_mandatory_arch {
+ my ($config, $target) = @_;
+ find { ref($_) eq 'ARRAY' } $config->{mandatory_arch},
+ (ref($config->{mandatory_arch}) eq 'HASH' ? ($config->{mandatory_arch}{$target}, $config->{mandatory_arch}{default}) : ()), [];
+}
+
1;