aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-09-25 06:23:38 +0000
committerThierry Vignaud <tv@mageia.org>2012-09-25 06:23:38 +0000
commit7986979446770d1ba29cb9452856bfb12cdafddb (patch)
tree2ad0a853f0a053b3050825e6abbae60e462ac57a
parent0e549fa3dd7930ebf8cb26746da819dfcb591d86 (diff)
downloadiurt-7986979446770d1ba29cb9452856bfb12cdafddb.tar
iurt-7986979446770d1ba29cb9452856bfb12cdafddb.tar.gz
iurt-7986979446770d1ba29cb9452856bfb12cdafddb.tar.bz2
iurt-7986979446770d1ba29cb9452856bfb12cdafddb.tar.xz
iurt-7986979446770d1ba29cb9452856bfb12cdafddb.zip
simplify finding excluded package
-rwxr-xr-xulri17
1 files changed, 5 insertions, 12 deletions
diff --git a/ulri b/ulri
index 975092a..c31f3c0 100755
--- a/ulri
+++ b/ulri
@@ -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;