summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-29 14:23:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-15 06:59:44 +0100
commit1131303ec4997885418f502138b68fa89c2b9f78 (patch)
tree07ab46afa88071fb5fe240d998f2a4b3e8d15542 /bitbake/lib/bb/cooker.py
parentffa2ca007f6f7fa2229e40336648b16ed01cbe6b (diff)
downloadpoky-1131303ec4997885418f502138b68fa89c2b9f78.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py4
1 files changed, 2 insertions, 2 deletions
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:
1349 failures += len(exc.args) 1349 failures += len(exc.args)
1350 retval = False 1350 retval = False
1351 except SystemExit as exc: 1351 except SystemExit as exc:
1352 self.command.finishAsyncCommand() 1352 self.command.finishAsyncCommand(str(exc))
1353 return False 1353 return False
1354 1354
1355 if not retval: 1355 if not retval:
@@ -1385,7 +1385,7 @@ class BBCooker:
1385 failures += len(exc.args) 1385 failures += len(exc.args)
1386 retval = False 1386 retval = False
1387 except SystemExit as exc: 1387 except SystemExit as exc:
1388 self.command.finishAsyncCommand() 1388 self.command.finishAsyncCommand(str(exc))
1389 return False 1389 return False
1390 1390
1391 if not retval: 1391 if not retval: