summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-05-19 20:41:58 +0000
committerRichard Purdie <richard@openedhand.com>2008-05-19 20:41:58 +0000
commitf1e89b2bb9f7d2677cd589f808df9594987fb1e0 (patch)
treeab835e90e7557d66aebd07d3a2d6d967843175e3 /bitbake/lib
parent4bf7ed5458d05f3d124eb00c2bfcd3c61877bdd1 (diff)
downloadopenembedded-core-f1e89b2bb9f7d2677cd589f808df9594987fb1e0.tar.gz
openembedded-core-f1e89b2bb9f7d2677cd589f808df9594987fb1e0.tar.bz2
openembedded-core-f1e89b2bb9f7d2677cd589f808df9594987fb1e0.zip
bitbake: Sync with upstream
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4504 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib')
-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:
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))
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):
"""bbmake build run started"""
+class BuildFailed(BuildBase):
+ """bbmake build run failed"""
+
+
class BuildCompleted(BuildBase):
"""bbmake build run completed"""
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):
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