ubuntu-build: support retrying builds in other states that failed-to-build

This commit is contained in:
Steve Langasek 2024-03-10 01:45:20 -08:00
parent f01502bda2
commit 691c1381db

View File

@ -100,6 +100,11 @@ def main():
type=int,
help="Rescore builds to <priority>.",
)
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