bitbake: command: Treat empty messages as failures, not CommandCompleted
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 Sep 2013 16:33:30 +0000 (17:33 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 14 Sep 2013 07:20:38 +0000 (08:20 +0100)
Empty messages should trigger CommandFailed, not CommandCompleted as
otherwise the exit code will be incorrect.

(Bitbake rev: 70a8ead31f9ffc987d9c6db61a926f7a9af8f8b1)

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

index 6c7b891..f1abaf7 100644 (file)
@@ -117,7 +117,7 @@ class Command:
             return False
 
     def finishAsyncCommand(self, msg=None, code=None):
-        if msg:
+        if msg or msg == "":
             bb.event.fire(CommandFailed(msg), self.cooker.event_data)
         elif code:
             bb.event.fire(CommandExit(code), self.cooker.event_data)