[bitbake-devel] [PATCH 6/6] bb/ui/crumbs/runningbuild: emit signal when command fails with exit signal

Joshua Lock josh at linux.intel.com
Wed Aug 3 01:17:39 UTC 2011


Emit the generic build-complete signal when a command fails with an exit
signal enabling the UI to update itself accordingly.

Addresses [YOCTO #1265]

Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
 lib/bb/ui/crumbs/runningbuild.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/bb/ui/crumbs/runningbuild.py b/lib/bb/ui/crumbs/runningbuild.py
index 2399ff3..bf72e2a 100644
--- a/lib/bb/ui/crumbs/runningbuild.py
+++ b/lib/bb/ui/crumbs/runningbuild.py
@@ -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
-- 
1.7.6





More information about the bitbake-devel mailing list