summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-09 17:30:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-09 22:43:46 +0100
commitb8321c5658124c50009a3c4dbead2df49e662812 (patch)
tree9493804fd8095e9f3f45804bd678abf6097e4008 /bitbake/lib/bb/parse
parentaf93b8937e0eab940879646f579948d814faeb2b (diff)
downloadpoky-b8321c5658124c50009a3c4dbead2df49e662812.tar.gz
bitbake/event/ast: Add RecipePreFinalise event
One of the implications is we need to register the event handlers before executing the anonymous python functions. I can't find any issue with making that change in any existing metadata use cases. (Bitbake rev: a981df3cc9bf410d24f39919959952bdc6c76d03) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r--bitbake/lib/bb/parse/ast.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index 547ea679b5..1180911a7d 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -308,12 +308,6 @@ def handleInherit(statements, filename, lineno, m):
308 308
309def finalize(fn, d, variant = None): 309def finalize(fn, d, variant = None):
310 bb.data.expandKeys(d) 310 bb.data.expandKeys(d)
311 bb.data.update_data(d)
312 code = []
313 for funcname in bb.data.getVar("__BBANONFUNCS", d) or []:
314 code.append("%s(d)" % funcname)
315 bb.utils.simple_exec("\n".join(code), {"d": d})
316 bb.data.update_data(d)
317 311
318 all_handlers = {} 312 all_handlers = {}
319 for var in bb.data.getVar('__BBHANDLERS', d) or []: 313 for var in bb.data.getVar('__BBHANDLERS', d) or []:
@@ -321,6 +315,15 @@ def finalize(fn, d, variant = None):
321 handler = bb.data.getVar(var, d) 315 handler = bb.data.getVar(var, d)
322 bb.event.register(var, handler) 316 bb.event.register(var, handler)
323 317
318 bb.event.fire(bb.event.RecipePreFinalise(fn), d)
319
320 bb.data.update_data(d)
321 code = []
322 for funcname in bb.data.getVar("__BBANONFUNCS", d) or []:
323 code.append("%s(d)" % funcname)
324 bb.utils.simple_exec("\n".join(code), {"d": d})
325 bb.data.update_data(d)
326
324 tasklist = bb.data.getVar('__BBTASKS', d) or [] 327 tasklist = bb.data.getVar('__BBTASKS', d) or []
325 bb.build.add_tasks(tasklist, d) 328 bb.build.add_tasks(tasklist, d)
326 329