mirror of
https://github.com/certbot/certbot.git
synced 2026-06-05 06:42:10 -04:00
Kill snapcraft build when a "Chroot problem" is encountered
This commit is contained in:
parent
db2ffea351
commit
8bdd36ed39
1 changed files with 5 additions and 1 deletions
|
|
@ -24,6 +24,10 @@ def _execute_build(target, archs, status, workspace):
|
|||
process_output.append(line)
|
||||
_extract_state(target, line, status)
|
||||
|
||||
if any(state for state in status[target].values() if state == 'Chroot problem'):
|
||||
# On this error the snapcraft process stales. Let's finish it.
|
||||
process.kill()
|
||||
|
||||
return process.wait(), process_output
|
||||
|
||||
|
||||
|
|
@ -44,7 +48,7 @@ def _build_snap(target, archs, status, lock):
|
|||
|
||||
with lock:
|
||||
dump_output = exit_code != 0
|
||||
failed_archs = [arch for arch in archs if status[target][arch] == 'Failed to build']
|
||||
failed_archs = [arch for arch in archs if status[target][arch] != 'Successfully built']
|
||||
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'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue