diff options
author | Pascal Terjan <pterjan@gmail.com> | 2016-02-15 19:48:32 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@gmail.com> | 2016-02-15 19:48:58 +0000 |
commit | 29c66cc18db43a5f11ca0115459f7556429275bc (patch) | |
tree | 320af323c4e581fc9debc295c75cf92eddd1ae21 /ulri | |
parent | 9847864c97b05732c2bbc40e9b7155f0938e6380 (diff) | |
download | iurt-29c66cc18db43a5f11ca0115459f7556429275bc.tar iurt-29c66cc18db43a5f11ca0115459f7556429275bc.tar.gz iurt-29c66cc18db43a5f11ca0115459f7556429275bc.tar.bz2 iurt-29c66cc18db43a5f11ca0115459f7556429275bc.tar.xz iurt-29c66cc18db43a5f11ca0115459f7556429275bc.zip |
Move something invariant out of a loop
Diffstat (limited to 'ulri')
-rwxr-xr-x | ulri | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -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"); |