From 691c1381dbbac02105c2dfe9aea14c7ee65c8996 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sun, 10 Mar 2024 01:45:20 -0800 Subject: [PATCH] ubuntu-build: support retrying builds in other states that failed-to-build --- ubuntu-build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ubuntu-build b/ubuntu-build index c83ead6..5fba28e 100755 --- a/ubuntu-build +++ b/ubuntu-build @@ -100,6 +100,11 @@ def main(): type=int, help="Rescore builds to .", ) + batch_options.add_argument( + "--state", action="store", dest="state", + help="Act on builds that are in the specified state (default: Failed to build)", + ) + parser.add_argument("packages", metavar="package", nargs="*", help=argparse.SUPPRESS) # Parse our options. @@ -266,9 +271,11 @@ def main(): if not args.packages: retry_count = 0 + if not args.state: + args.state='Failed to build' series = Distribution("ubuntu").getSeries(release) for build in series.getBuildRecords( - build_state='Failed to build', pocket=pocket + build_state=args.state, pocket=pocket ): if build.arch_tag not in archs: continue