From 1131303ec4997885418f502138b68fa89c2b9f78 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 29 Feb 2016 14:23:33 +0000 Subject: bitbake: cooker: pass exception to finishAsyncCommand An invalid task causes bitbake to exit incorrectly, firing a CommandCompleted event rather than a CommandFailed one. This means that clients listening for CommandFailed events are unable to detect the build failure even though one occurred. Passing an exception string to finishAsyncCommand when a task fails causes the CommandFailed event to be fired correctly. [YOCTO #9087] (Bitbake rev: 98a2c37e077b16e3bc8bb102bd18b293130d15a4) Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 3747e0890b..4068b8f9b3 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1349,7 +1349,7 @@ class BBCooker: failures += len(exc.args) retval = False except SystemExit as exc: - self.command.finishAsyncCommand() + self.command.finishAsyncCommand(str(exc)) return False if not retval: @@ -1385,7 +1385,7 @@ class BBCooker: failures += len(exc.args) retval = False except SystemExit as exc: - self.command.finishAsyncCommand() + self.command.finishAsyncCommand(str(exc)) return False if not retval: -- cgit v1.2.3-54-g00ecf