aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2016-10-20 15:18:25 +0100
committerPascal Terjan <pterjan@gmail.com>2016-10-20 20:25:53 +0100
commit35d26e4034d10592401c25801290e2b7fb111198 (patch)
tree35eb7155e42c0b404bae2e9d15b046ba79db2884
parent45e72c069afa78e2939d43f0a3cefe8012a93ba8 (diff)
downloadiurt-35d26e4034d10592401c25801290e2b7fb111198.tar
iurt-35d26e4034d10592401c25801290e2b7fb111198.tar.gz
iurt-35d26e4034d10592401c25801290e2b7fb111198.tar.bz2
iurt-35d26e4034d10592401c25801290e2b7fb111198.tar.xz
iurt-35d26e4034d10592401c25801290e2b7fb111198.zip
Only mandatory arches are fatal
Currently any previous failures casues to force fail anything succeeding later.
-rw-r--r--NEWS2
-rw-r--r--lib/Iurt/Queue.pm11
-rwxr-xr-xulri5
3 files changed, 14 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 8869cea..dff2124 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- ulri: only fail succesful arches if previous failure was from a mandatory
+ arch
- emi: skip all posts for non finishers instead of hardcoding a list
0.6.27
diff --git a/lib/Iurt/Queue.pm b/lib/Iurt/Queue.pm
index f6907e6..3f552b9 100644
--- a/lib/Iurt/Queue.pm
+++ b/lib/Iurt/Queue.pm
@@ -12,6 +12,7 @@ use strict;
our @EXPORT = qw(
get_upload_tree_state
cleanup_failed_build
+ check_if_mandatory_arch_failed
);
sub apply_to_upload_tree {
@@ -52,7 +53,15 @@ sub apply_to_upload_tree {
}
}
}
-
+
+sub check_if_mandatory_arch_failed {
+ my ($done_dir, $prefix, $ent, $config) = @_;
+ my $mandatory_arch = get_mandatory_arch($config, $ent->{target});
+ foreach my $arch (@$mandatory_arch) {
+ return 1 if -f "${done_dir}/${prefix}_${arch}.fail";
+ }
+}
+
sub cleanup_failed_build {
my ($todo_dir, $done_dir, $fail_dir, $prefix, $ent, $arch, $config) = @_;
diff --git a/ulri b/ulri
index 2e29418..1df576f 100755
--- a/ulri
+++ b/ulri
@@ -36,7 +36,7 @@ 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::File qw(create_file);
use Iurt::Process qw(check_pid);
-use Iurt::Queue qw(cleanup_failed_build get_upload_tree_state);
+use Iurt::Queue qw(check_if_mandatory_arch_failed cleanup_failed_build get_upload_tree_state);
use Iurt::Mail qw(sendmail);
use Iurt::Util qw(plog_init plog ssh_setup ssh sout sget sput);
use Iurt::Ulri qw(build_package warn_about_failure);
@@ -384,8 +384,7 @@ foreach my $prefix (keys %pkg_tree) {
make_path("$done_dir/$prefix");
sget($remote, "$prefix_dir/log/*", "$done_dir/$prefix");
ssh($remote, "rm -rf $prefix_dir");
- if (-d "$fail_dir/$prefix") {
- # Other arch had failed
+ if (check_if_mandatory_arch_failed($done_dir, $prefix, $ent, $config)) {
cleanup_failed_build($todo_dir, $done_dir, $fail_dir, $prefix, $ent, $arch, $config);
} else {
$something_finished = 1;