diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-29 22:57:13 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-02 09:55:47 +0100 |
commit | a1fa9d11540b5de1abf4bedcde746f9727377950 (patch) | |
tree | 97caad9d72e99730620bdf2e78f889dda85c7a2d /bitbake/lib | |
parent | 735b342620c42ceb818971a707e0e31cb093b408 (diff) | |
download | poky-a1fa9d11540b5de1abf4bedcde746f9727377950.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: fdc2d3df35ad1282c4ad85d76519e395b023a563)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9eee9fd4f2f96789ad2b037e74d561bdc1426856)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/build.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 39e7dba027..ad031cc702 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -694,7 +694,7 @@ def _exec_task(fn, task, d, quieterr): | |||
694 | except bb.BBHandledException: | 694 | except bb.BBHandledException: |
695 | event.fire(TaskFailed(task, fn, logfn, localdata, True), localdata) | 695 | event.fire(TaskFailed(task, fn, logfn, localdata, True), localdata) |
696 | return 1 | 696 | return 1 |
697 | except Exception as exc: | 697 | except (Exception, SystemExit) as exc: |
698 | if quieterr: | 698 | if quieterr: |
699 | event.fire(TaskFailedSilent(task, fn, logfn, localdata), localdata) | 699 | event.fire(TaskFailedSilent(task, fn, logfn, localdata), localdata) |
700 | else: | 700 | else: |