bb/ui/crumbs/runningbuild: emit signal when command fails with exit signal
authorJoshua Lock <josh@linux.intel.com>
Wed, 3 Aug 2011 01:12:33 +0000 (18:12 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Aug 2011 16:51:57 +0000 (17:51 +0100)
Emit the generic build-complete signal when a command fails with an exit
signal enabling the UI to update itself accordingly.

Addresses [YOCTO #1265]

(Bitbake rev: 25ec13075855f7e321a9763682a8cd4ca09203cd)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/ui/crumbs/runningbuild.py

index 2399ff3..bf72e2a 100644 (file)
@@ -239,6 +239,12 @@ class RunningBuild (gobject.GObject):
             else:
                 self.emit ("build-succeeded")
 
+        elif isinstance(event, bb.command.CommandFailed):
+            if event.error.startswith("Exited with"):
+                # If the command fails with an exit code we're done, emit the
+                # generic signal for the UI to notify the user
+                self.emit("build-complete")
+
         elif isinstance(event, bb.event.CacheLoadStarted) and pbar:
             pbar.set_title("Loading cache")
             self.progress_total = event.total