diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-09-25 06:23:38 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-09-25 06:23:38 +0000 |
commit | 7986979446770d1ba29cb9452856bfb12cdafddb (patch) | |
tree | 2ad0a853f0a053b3050825e6abbae60e462ac57a /ulri | |
parent | 0e549fa3dd7930ebf8cb26746da819dfcb591d86 (diff) | |
download | iurt-7986979446770d1ba29cb9452856bfb12cdafddb.tar iurt-7986979446770d1ba29cb9452856bfb12cdafddb.tar.gz iurt-7986979446770d1ba29cb9452856bfb12cdafddb.tar.bz2 iurt-7986979446770d1ba29cb9452856bfb12cdafddb.tar.xz iurt-7986979446770d1ba29cb9452856bfb12cdafddb.zip |
simplify finding excluded package
Diffstat (limited to 'ulri')
-rwxr-xr-x | ulri | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -32,7 +32,7 @@ # use strict; -use MDK::Common qw(cat_ if_); +use MDK::Common qw(any cat_ if_); use Iurt::Config qw(config_usage get_date config_init get_author_email check_arch check_noarch); use Iurt::Process qw(check_pid); use Iurt::File qw(check_upload_tree); @@ -566,7 +566,6 @@ foreach my $prefix (sort keys %pkg_tree) { # need to find a bot for each arch foreach my $arch (keys %{$config->{bot}}) { - my $exclude; # Skip this arch if package is building as noarch # @@ -587,16 +586,10 @@ foreach my $prefix (sort keys %pkg_tree) { } #plog("@$srpms is noarch") if $noarch; - - foreach my $srpm (@$srpms) { - if (!check_arch("$todo_dir/${prefix}_$srpm", $arch)) { - plog('WARN', "excluding from $arch: $srpm"); - $exclude = 1; - last; - } - } - - if ($exclude) { + + my $excluded = any { !check_arch("$todo_dir/${prefix}_$_", $arch) } @$srpms; + if ($excluded) { + plog('WARN', "excluding from $arch: $excluded"); create_file("$done_dir/${prefix}_$arch.excluded", "ulri $arch excluded"); next; |