diff options
author | Pascal Terjan <pterjan@mageia.org> | 2018-10-14 22:24:11 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2018-10-14 22:24:11 +0000 |
commit | 33e3b1947012309582892b54d4404f4f37745142 (patch) | |
tree | 26e3ff52cfde4a4e21abf839a96d670387045507 /lib/Iurt/Queue.pm | |
parent | 71c0127b2afcfa59a780926dfd05605133b833fb (diff) | |
download | iurt-33e3b1947012309582892b54d4404f4f37745142.tar iurt-33e3b1947012309582892b54d4404f4f37745142.tar.gz iurt-33e3b1947012309582892b54d4404f4f37745142.tar.bz2 iurt-33e3b1947012309582892b54d4404f4f37745142.tar.xz iurt-33e3b1947012309582892b54d4404f4f37745142.zip |
Delete .done files when a mandatory arch fails
Diffstat (limited to 'lib/Iurt/Queue.pm')
-rw-r--r-- | lib/Iurt/Queue.pm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Iurt/Queue.pm b/lib/Iurt/Queue.pm index 449a7bf..5d4dbc5 100644 --- a/lib/Iurt/Queue.pm +++ b/lib/Iurt/Queue.pm @@ -99,7 +99,16 @@ sub cleanup_failed_build { move($file, "$fail_dir/${prefix}_$rpm"); } - if (!$fatal_failure) { + if ($fatal_failure) { + foreach my $done_arch (keys %{$ent->{media}{$media}{done_arch}}) { + my $file = "$done_dir/${prefix}_${done_arch}.done"; + if (-f $file) { + plog('DEBUG', "deleting $file"); + unlink $file; + } + delete $ent->{media}{$media}{done_arch}{$done_arch}; + } + } else { # keep rpms for other architectures $ent->{rpms} = $kept_rpms; # but delete src.rpm if we are now done @@ -113,7 +122,6 @@ sub cleanup_failed_build { return; } - # abort all remaining builds delete $ent->{rpms}; foreach my $srpm (@{$ent->{srpms}}) { @@ -135,6 +143,8 @@ sub cleanup_failed_build { move($file, "$fail_dir/$prefix/"); } } + + # TODO: abort all builds in progress } sub get_upload_tree_state { |