aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2016-02-15 19:48:32 +0000
committerPascal Terjan <pterjan@gmail.com>2016-02-15 19:48:58 +0000
commit29c66cc18db43a5f11ca0115459f7556429275bc (patch)
tree320af323c4e581fc9debc295c75cf92eddd1ae21
parent9847864c97b05732c2bbc40e9b7155f0938e6380 (diff)
downloadiurt-29c66cc18db43a5f11ca0115459f7556429275bc.tar
iurt-29c66cc18db43a5f11ca0115459f7556429275bc.tar.gz
iurt-29c66cc18db43a5f11ca0115459f7556429275bc.tar.bz2
iurt-29c66cc18db43a5f11ca0115459f7556429275bc.tar.xz
iurt-29c66cc18db43a5f11ca0115459f7556429275bc.zip
Move something invariant out of a loop
-rwxr-xr-xulri13
1 files changed, 5 insertions, 8 deletions
diff --git a/ulri b/ulri
index 5cd8f1e..a6ca138 100755
--- a/ulri
+++ b/ulri
@@ -484,6 +484,11 @@ foreach my $prefix (sort keys %pkg_tree) {
# count noarch todos only once even if searching multiple bots
my $noarch_countflag = 0;
+ # If all packages in a group are noarch, consider the entire group
+ # as noarch
+ my $noarch = 1;
+ $noarch = 0 if any { !check_noarch("$todo_dir/${prefix}_$_") } @$srpms;
+
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}};
# need to find a bot for each arch
@@ -494,14 +499,6 @@ foreach my $prefix (sort keys %pkg_tree) {
next if $pkg_tree{$prefix}{media}{$media}{arch}{$arch};
next if $pkg_tree{$prefix}{media}{$media}{excluded_arch}{$arch};
- # If all packages in a group are noarch, consider the entire group
- # as noarch
- #
- my $noarch = 1;
- $noarch = 0 if any { !check_noarch("$todo_dir/${prefix}_$_") } @$srpms;
-
- #plog("@$srpms is noarch") if $noarch;
-
my $excluded = any { !check_arch("$todo_dir/${prefix}_$_", $arch) } @$srpms;
if ($excluded) {
plog('WARN', "excluding from $arch: $excluded");