aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xemi7
-rw-r--r--lib/Iurt/Config.pm7
-rwxr-xr-xulri7
3 files changed, 13 insertions, 8 deletions
diff --git a/emi b/emi
index 2b8e328..e8f6ac7 100755
--- a/emi
+++ b/emi
@@ -29,7 +29,7 @@
use strict;
use File::Path qw(make_path);
-use Iurt::Config qw(config_usage config_init get_author_email get_mandatory_arch);
+use Iurt::Config qw(config_usage config_init get_author_email get_target_arch get_mandatory_arch);
use Iurt::Process qw(check_pid);
use Iurt::Mail qw(sendmail);
use Iurt::File qw(check_upload_tree);
@@ -327,11 +327,10 @@ sub upload_prefix_in_section {
# unlink the sources rpm unless some non mandatory arch still need to be done
my $all_done = 1;
if (!defined($pkg_tree{$prefix}{section}{$section}{arch}{noarch})) {
- my $arch_list = find { ref($_) eq 'ARRAY' } $config->{arch}, (ref($config->{arch}) eq 'HASH' ? ($config->{arch}{$target}, $config->{arch}{default}) : ());
- my @arch_list = $arch_list ? @$arch_list : keys %{$config->{bot}};
+ my $arch_list = get_target_arch($config, $target);
# If we are here, mandatory arches are done, no need to check them
my $mandatory_arch = get_mandatory_arch($config, $target);
- foreach my $arch (difference2(\@arch_list, $mandatory_arch)) {
+ foreach my $arch (difference2($arch_list, $mandatory_arch)) {
next if $pkg_tree{$prefix}{section}{$section}{arch}{$arch};
$all_done = 0;
}
diff --git a/lib/Iurt/Config.pm b/lib/Iurt/Config.pm
index 7b07d7a..467161e 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_target_arch
get_mandatory_arch
%arch_comp
);
@@ -181,6 +182,12 @@ sub check_arch {
return 1;
}
+sub get_target_arch {
+ my ($config, $target) = @_;
+ find { ref($_) eq 'ARRAY' } $config->{arch},
+ (ref($config->{arch}) eq 'HASH' ? ($config->{arch}{$target}, $config->{arch}{default}) : ()), [ keys %{$config->{bot}} ];
+}
+
sub get_mandatory_arch {
my ($config, $target) = @_;
find { ref($_) eq 'ARRAY' } $config->{mandatory_arch},
diff --git a/ulri b/ulri
index b4230c9..277f231 100755
--- a/ulri
+++ b/ulri
@@ -33,7 +33,7 @@
use strict;
use MDK::Common qw(any cat_ if_ find);
-use Iurt::Config qw(config_usage get_date config_init get_author_email check_arch check_noarch);
+use Iurt::Config qw(config_usage get_date config_init get_author_email check_arch check_noarch get_target_arch);
use Iurt::Process qw(check_pid);
use Iurt::File qw(check_upload_tree cleanup_failed_build);
use Iurt::Mail qw(sendmail);
@@ -576,10 +576,9 @@ foreach my $prefix (sort keys %pkg_tree) {
# count noarch todos only once even if searching multiple bots
my $noarch_countflag = 0;
- my $arch_list = find { ref($_) eq 'ARRAY' } $config->{arch}, (ref($config->{arch}) eq 'HASH' ? ($config->{arch}{$target}, $config->{arch}{default}) : ());
- my @arch_list = $arch_list ? @$arch_list : keys %{$config->{bot}};
+ my $arch_list = get_target_arch($config, $target);
# need to find a bot for each arch
- foreach my $arch (@arch_list) {
+ foreach my $arch (@$arch_list) {
# Skip this arch if package is building as noarch
#