cooker.py: Make sure Build Completed events are generated even when tasks fail
authorRichard Purdie <rpurdie@linux.intel.com>
Mon, 19 May 2008 20:14:22 +0000 (20:14 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 19 May 2008 20:14:22 +0000 (20:14 +0000)
ChangeLog
lib/bb/cooker.py

index 62be6ea..29a292b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -41,6 +41,7 @@ Changes in BitBake 1.8.x:
        - Add PERSISTENT_DIR to store the PersistData in a persistent
          directory != the cache dir.
        - Add md5 and sha256 checksum generation functions to utils.py
+       - Make sure Build Completed events are generated even when tasks fail
 
 Changes in BitBake 1.8.10:
        - Psyco is available only for x86 - do not use it on other architectures.
index b8c81ec..1f9bb49 100644 (file)
@@ -509,8 +509,11 @@ class BBCooker:
         try:
             failures = rq.execute_runqueue()
         except runqueue.TaskFailure, fnids:
+            failures = 0
             for fnid in fnids:
                 bb.msg.error(bb.msg.domain.Build, "'%s' failed" % taskdata.fn_index[fnid])
+                failures = failures + 1
+            bb.event.fire(bb.event.BuildCompleted(buildname, [item], self.configuration.event_data, failures))
             return False
         bb.event.fire(bb.event.BuildCompleted(buildname, [item], self.configuration.event_data, failures))
         return True
@@ -543,8 +546,11 @@ class BBCooker:
         try:
             failures = rq.execute_runqueue()
         except runqueue.TaskFailure, fnids:
+            failures = 0
             for fnid in fnids:
                 bb.msg.error(bb.msg.domain.Build, "'%s' failed" % taskdata.fn_index[fnid])
+                failures = failures + 1
+            bb.event.fire(bb.event.BuildCompleted(buildname, targets, self.configuration.event_data, failures))
             sys.exit(1)
         bb.event.fire(bb.event.BuildCompleted(buildname, targets, self.configuration.event_data, failures))