bitbake: Sync with upstream

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4504 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie 2008-05-19 20:41:58 +00:00
parent 4bf7ed5458
commit f1e89b2bb9
3 changed files with 12 additions and 2 deletions

View File

@ -509,8 +509,11 @@ class BBCooker:
try: try:
failures = rq.execute_runqueue() failures = rq.execute_runqueue()
except runqueue.TaskFailure, fnids: except runqueue.TaskFailure, fnids:
failures = 0
for fnid in fnids: for fnid in fnids:
bb.msg.error(bb.msg.domain.Build, "'%s' failed" % taskdata.fn_index[fnid]) 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 return False
bb.event.fire(bb.event.BuildCompleted(buildname, [item], self.configuration.event_data, failures)) bb.event.fire(bb.event.BuildCompleted(buildname, [item], self.configuration.event_data, failures))
return True return True
@ -543,8 +546,11 @@ class BBCooker:
try: try:
failures = rq.execute_runqueue() failures = rq.execute_runqueue()
except runqueue.TaskFailure, fnids: except runqueue.TaskFailure, fnids:
failures = 0
for fnid in fnids: for fnid in fnids:
bb.msg.error(bb.msg.domain.Build, "'%s' failed" % taskdata.fn_index[fnid]) 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) sys.exit(1)
bb.event.fire(bb.event.BuildCompleted(buildname, targets, self.configuration.event_data, failures)) bb.event.fire(bb.event.BuildCompleted(buildname, targets, self.configuration.event_data, failures))

View File

@ -230,6 +230,10 @@ class BuildStarted(BuildBase):
"""bbmake build run started""" """bbmake build run started"""
class BuildFailed(BuildBase):
"""bbmake build run failed"""
class BuildCompleted(BuildBase): class BuildCompleted(BuildBase):
"""bbmake build run completed""" """bbmake build run completed"""

View File

@ -93,7 +93,7 @@ def handle(fn, d, include = 0):
init(d) init(d)
if ext == ".bbclass": if ext == ".bbclass":
__classname__ = root __classname__ = root.replace('-','_')
classes.append(__classname__) classes.append(__classname__)
__inherit_cache = data.getVar('__inherit_cache', d) or [] __inherit_cache = data.getVar('__inherit_cache', d) or []
if not fn in __inherit_cache: if not fn in __inherit_cache:
@ -247,7 +247,7 @@ def feeder(lineno, s, fn, root, d):
m = __func_start_regexp__.match(s) m = __func_start_regexp__.match(s)
if m: if m:
__infunc__ = m.group("func") or "__anonymous" __infunc__ = (m.group("func") or "__anonymous").replace('-','_')
key = __infunc__ key = __infunc__
if data.getVar(key, d): if data.getVar(key, d):
# clean up old version of this piece of metadata, as its # clean up old version of this piece of metadata, as its