summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/cooker.py6
-rw-r--r--bitbake/lib/bb/event.py4
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py4
3 files changed, 12 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 619791f174..8e6acb19fc 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -509,8 +509,11 @@ class BBCooker:
509 try: 509 try:
510 failures = rq.execute_runqueue() 510 failures = rq.execute_runqueue()
511 except runqueue.TaskFailure, fnids: 511 except runqueue.TaskFailure, fnids:
512 failures = 0
512 for fnid in fnids: 513 for fnid in fnids:
513 bb.msg.error(bb.msg.domain.Build, "'%s' failed" % taskdata.fn_index[fnid]) 514 bb.msg.error(bb.msg.domain.Build, "'%s' failed" % taskdata.fn_index[fnid])
515 failures = failures + 1
516 bb.event.fire(bb.event.BuildCompleted(buildname, [item], self.configuration.event_data, failures))
514 return False 517 return False
515 bb.event.fire(bb.event.BuildCompleted(buildname, [item], self.configuration.event_data, failures)) 518 bb.event.fire(bb.event.BuildCompleted(buildname, [item], self.configuration.event_data, failures))
516 return True 519 return True
@@ -543,8 +546,11 @@ class BBCooker:
543 try: 546 try:
544 failures = rq.execute_runqueue() 547 failures = rq.execute_runqueue()
545 except runqueue.TaskFailure, fnids: 548 except runqueue.TaskFailure, fnids:
549 failures = 0
546 for fnid in fnids: 550 for fnid in fnids:
547 bb.msg.error(bb.msg.domain.Build, "'%s' failed" % taskdata.fn_index[fnid]) 551 bb.msg.error(bb.msg.domain.Build, "'%s' failed" % taskdata.fn_index[fnid])
552 failures = failures + 1
553 bb.event.fire(bb.event.BuildCompleted(buildname, targets, self.configuration.event_data, failures))
548 sys.exit(1) 554 sys.exit(1)
549 bb.event.fire(bb.event.BuildCompleted(buildname, targets, self.configuration.event_data, failures)) 555 bb.event.fire(bb.event.BuildCompleted(buildname, targets, self.configuration.event_data, failures))
550 556
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index c0a59e6120..fb99c3912d 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -230,6 +230,10 @@ class BuildStarted(BuildBase):
230 """bbmake build run started""" 230 """bbmake build run started"""
231 231
232 232
233class BuildFailed(BuildBase):
234 """bbmake build run failed"""
235
236
233class BuildCompleted(BuildBase): 237class BuildCompleted(BuildBase):
234 """bbmake build run completed""" 238 """bbmake build run completed"""
235 239
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index d7bf6d4f37..764def8ec0 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -93,7 +93,7 @@ def handle(fn, d, include = 0):
93 init(d) 93 init(d)
94 94
95 if ext == ".bbclass": 95 if ext == ".bbclass":
96 __classname__ = root 96 __classname__ = root.replace('-','_')
97 classes.append(__classname__) 97 classes.append(__classname__)
98 __inherit_cache = data.getVar('__inherit_cache', d) or [] 98 __inherit_cache = data.getVar('__inherit_cache', d) or []
99 if not fn in __inherit_cache: 99 if not fn in __inherit_cache:
@@ -247,7 +247,7 @@ def feeder(lineno, s, fn, root, d):
247 247
248 m = __func_start_regexp__.match(s) 248 m = __func_start_regexp__.match(s)
249 if m: 249 if m:
250 __infunc__ = m.group("func") or "__anonymous" 250 __infunc__ = (m.group("func") or "__anonymous").replace('-','_')
251 key = __infunc__ 251 key = __infunc__
252 if data.getVar(key, d): 252 if data.getVar(key, d):
253# clean up old version of this piece of metadata, as its 253# clean up old version of this piece of metadata, as its