diff options
| -rw-r--r-- | bitbake/lib/bb/event.py | 10 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/ast.py | 15 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 1 |
3 files changed, 17 insertions, 9 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index a3288b619b..7d47edb9e7 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py | |||
| @@ -206,13 +206,17 @@ def getName(e): | |||
| 206 | class ConfigParsed(Event): | 206 | class ConfigParsed(Event): |
| 207 | """Configuration Parsing Complete""" | 207 | """Configuration Parsing Complete""" |
| 208 | 208 | ||
| 209 | class RecipeParsed(Event): | 209 | class RecipeEvent(Event): |
| 210 | """ Recipe Parsing Complete """ | ||
| 211 | |||
| 212 | def __init__(self, fn): | 210 | def __init__(self, fn): |
| 213 | self.fn = fn | 211 | self.fn = fn |
| 214 | Event.__init__(self) | 212 | Event.__init__(self) |
| 215 | 213 | ||
| 214 | class RecipePreFinalise(RecipeEvent): | ||
| 215 | """ Recipe Parsing Complete but not yet finialised""" | ||
| 216 | |||
| 217 | class RecipeParsed(RecipeEvent): | ||
| 218 | """ Recipe Parsing Complete """ | ||
| 219 | |||
| 216 | class StampUpdate(Event): | 220 | class StampUpdate(Event): |
| 217 | """Trigger for any adjustment of the stamp files to happen""" | 221 | """Trigger for any adjustment of the stamp files to happen""" |
| 218 | 222 | ||
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 | ||
| 309 | def finalize(fn, d, variant = None): | 309 | def 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 | ||
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index f330c084df..997eb3fe89 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
| @@ -228,6 +228,7 @@ def main(server, eventHandler): | |||
| 228 | bb.event.StampUpdate, | 228 | bb.event.StampUpdate, |
| 229 | bb.event.ConfigParsed, | 229 | bb.event.ConfigParsed, |
| 230 | bb.event.RecipeParsed, | 230 | bb.event.RecipeParsed, |
| 231 | bb.event.RecipePreFinalise, | ||
| 231 | bb.runqueue.runQueueEvent, | 232 | bb.runqueue.runQueueEvent, |
| 232 | bb.runqueue.runQueueExitWait)): | 233 | bb.runqueue.runQueueExitWait)): |
| 233 | continue | 234 | continue |
