From 3b92230de8ea7eafa4388e27a25d5e2a3ebf4a7d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 24 Jan 2023 15:59:33 +0000 Subject: [PATCH] stdlib/fedora.gl: Add new %fedora-retry-failed flag --- stdlib/fedora.gl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/stdlib/fedora.gl b/stdlib/fedora.gl index ef515c6..3a8fa42 100644 --- a/stdlib/fedora.gl +++ b/stdlib/fedora.gl @@ -34,6 +34,11 @@ # detect if a rebuild has been attempted before in this run. # eg. "Perl 5.99 rebuild" # +# %fedora-retry-failed: +# If set to 1 then failed builds are retried automatically. +# If set to 0 then failed builds must be manually restarted. +# Normally you want this to be 0. +# # %fedora-source-packages: # List of source packages that will be rebuilt. # @@ -82,8 +87,13 @@ predicate is-koji-built (pkg) = { # Complete so we don't need to rebuild. exit 0 ;; FAILED) - # Failed builds must be examined and fixed manually. - exit 1 ;; + if [ %fedora-retry-failed -ne 0 ]; then + # Resubmit it automatically. + exit 99 + else + # Fail, must be examined and retried manually. + exit 1 + fi ;; BUILDING) # Cancel the build, we will resubmit it. koji cancel $taskid ||: -- 1.8.3.1