]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake: Sync with upstream
authorRichard Purdie <richard@openedhand.com>
Mon, 19 May 2008 20:41:58 +0000 (20:41 +0000)
committerRichard Purdie <richard@openedhand.com>
Mon, 19 May 2008 20:41:58 +0000 (20:41 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4504 311d38ba-8fff-0310-9ca6-ca027cbcb966

bitbake/lib/bb/cooker.py
bitbake/lib/bb/event.py
bitbake/lib/bb/parse/parse_py/BBHandler.py

index 619791f174f309fdbb691dc645842f3b3457f7b3..8e6acb19fc897ffb0b7826c9fb16a2dba14d20b5 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))
 
index c0a59e612008ac05e730b87b4239c5c48516e208..fb99c3912d6bbbd5b826fbb7b63ef953c1f399a6 100644 (file)
@@ -230,6 +230,10 @@ class BuildStarted(BuildBase):
     """bbmake build run started"""
 
 
+class BuildFailed(BuildBase):
+    """bbmake build run failed"""
+
+
 class BuildCompleted(BuildBase):
     """bbmake build run completed"""
 
index d7bf6d4f372cfd5de5dfbde71891abb5f93cfd76..764def8ec015ea86f00d82bfa508019fe13792d1 100644 (file)
@@ -93,7 +93,7 @@ def handle(fn, d, include = 0):
     init(d)
 
     if ext == ".bbclass":
-        __classname__ = root
+        __classname__ = root.replace('-','_')
         classes.append(__classname__)
         __inherit_cache = data.getVar('__inherit_cache', d) or []
         if not fn in __inherit_cache:
@@ -247,7 +247,7 @@ def feeder(lineno, s, fn, root, d):
 
     m = __func_start_regexp__.match(s)
     if m:
-        __infunc__ = m.group("func") or "__anonymous"
+        __infunc__ = (m.group("func") or "__anonymous").replace('-','_')
         key = __infunc__
         if data.getVar(key, d):
 #           clean up old version of this piece of metadata, as its