summaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorChris Larson <clarson@mvista.com>2009-09-12 22:42:45 -0700
committerChris Larson <clarson@mvista.com>2009-09-14 11:08:23 -0700
commita002f4f0d13ea7dca261b77d5e2278c3fd35acda (patch)
tree858bfe8315b4052f3a0b153d173a04dfebbc4791 /lib/bb
parent30d00e1a550931cb7f62e6574a7dd2d7b33f182b (diff)
downloadbitbake-a002f4f0d13ea7dca261b77d5e2278c3fd35acda.tar.gz
Add a RecipeParsed event, which can be used as an alternative to anonymous functions.
Signed-off-by: Chris Larson <clarson@mvista.com>
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/event.py7
-rw-r--r--lib/bb/parse/parse_py/BBHandler.py2
-rw-r--r--lib/bb/ui/knotty.py2
3 files changed, 11 insertions, 0 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 8f0a1961d..86b566feb 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -125,6 +125,13 @@ def getName(e):
class ConfigParsed(Event):
"""Configuration Parsing Complete"""
+class RecipeParsed(Event):
+ """ Recipe Parsing Complete """
+
+ def __init__(self, fn, d):
+ self.fn = fn
+ Event.__init__(self, d)
+
class StampUpdate(Event):
"""Trigger for any adjustment of the stamp files to happen"""
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index 4f98bf9c3..5b1b72eec 100644
--- a/lib/bb/parse/parse_py/BBHandler.py
+++ b/lib/bb/parse/parse_py/BBHandler.py
@@ -109,6 +109,8 @@ def finalise(fn, d):
tasklist = data.getVar('__BBTASKS', d) or []
bb.build.add_tasks(tasklist, d)
+ bb.event.fire(bb.event.RecipeParsed(fn, d))
+
def handle(fn, d, include = 0):
global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __infunc__, __body__, __residue__
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index a334c2977..a8b5829e4 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -140,6 +140,8 @@ def init(server, eventHandler):
continue
if event[0].startswith('bb.event.ConfigParsed'):
continue
+ if event[0].startswith('bb.event.RecipeParsed'):
+ continue
print "Unknown Event: %s" % event
except KeyboardInterrupt: