Display specific helper for "Chroot problem" status and cancel retry mechanism in this case.

This commit is contained in:
Adrien Ferrand 2021-03-07 15:28:21 +01:00
parent dc952ff1f1
commit 52bac7098e

View file

@ -50,6 +50,13 @@ def _build_snap(target, archs, status, running, lock):
with lock:
dump_output = exit_code != 0
failed_archs = [arch for arch in archs if status[target][arch] != 'Successfully built']
if any(arch for arch in archs if status[target][arch] == 'Chroot problem'):
print('Some builds failed with the status "Chroot problem".')
print('This status is known to make any future build fail until either '
'the source code changes or the build on Launchpad is deleted.')
print('Please fix the build appropriately before trying a new one.')
# It is useless to retry in this situation.
retry = 0
if exit_code == 0 and not failed_archs:
# We expect to have all target snaps available, or something bad happened.
snaps_list = glob.glob(join(workspace, '*.snap'))