diff options
Diffstat (limited to 'lib/Iurt/Config.pm')
-rw-r--r-- | lib/Iurt/Config.pm | 7 |
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; |