]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: pass exception to finishAsyncCommand
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Feb 2016 14:23:33 +0000 (14:23 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Apr 2016 13:44:30 +0000 (14:44 +0100)
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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py

index 3747e0890b54db5b162c6f458979e60266bbb68d..4068b8f9b3a134a8b90e39ebdacf931d1071f2b8 100644 (file)
@@ -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: