summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-10 10:02:08 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-02 09:55:51 +0100
commit55d4a252a8ce37c2282ba2d28363cfe7f56990dc (patch)
treed0d1805c9283c8e447ebe6d3708b7c9d6d8b8d5c /bitbake
parent674fa8dc46dc89b608a6d6fb83f6db2d348dd564 (diff)
downloadpoky-55d4a252a8ce37c2282ba2d28363cfe7f56990dc.tar.gz
bitbake: build: Handle SystemExit in python tasks correctly
If a python task fails with sys.exit(), we currently see no TaskFailed event. The high level code does detect the exit code and fail the task but it can leave the UI inconsistent with log output. Fix this be intercepting SystemExit explicitly. This makes python task failures consistent with shell task failures. (Bitbake rev: 8dec1a58ff176b82006a084537156f65ad81def9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9eee9fd4f2f96789ad2b037e74d561bdc1426856) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/build.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index fa22a1b47f..04971636fe 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -587,7 +587,7 @@ def _exec_task(fn, task, d, quieterr):
587 except bb.BBHandledException: 587 except bb.BBHandledException:
588 event.fire(TaskFailed(task, fn, logfn, localdata, True), localdata) 588 event.fire(TaskFailed(task, fn, logfn, localdata, True), localdata)
589 return 1 589 return 1
590 except Exception as exc: 590 except (Exception, SystemExit) as exc:
591 if quieterr: 591 if quieterr:
592 event.fire(TaskFailedSilent(task, fn, logfn, localdata), localdata) 592 event.fire(TaskFailedSilent(task, fn, logfn, localdata), localdata)
593 else: 593 else: