summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/ast.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/parse/ast.py')
-rw-r--r--bitbake/lib/bb/parse/ast.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index 7581d003fd..327e45c8ac 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -391,6 +391,14 @@ def finalize(fn, d, variant = None):
391 if d.getVar("_FAILPARSINGERRORHANDLED", False) == True: 391 if d.getVar("_FAILPARSINGERRORHANDLED", False) == True:
392 raise bb.BBHandledException() 392 raise bb.BBHandledException()
393 393
394 while True:
395 inherits = d.getVar('__BBDEFINHERITS', False) or []
396 if not inherits:
397 break
398 inherit, filename, lineno = inherits.pop(0)
399 d.setVar('__BBDEFINHERITS', inherits)
400 bb.parse.BBHandler.inherit(inherit, filename, lineno, d, deferred=True)
401
394 for var in d.getVar('__BBHANDLERS', False) or []: 402 for var in d.getVar('__BBHANDLERS', False) or []:
395 # try to add the handler 403 # try to add the handler
396 handlerfn = d.getVarFlag(var, "filename", False) 404 handlerfn = d.getVarFlag(var, "filename", False)
@@ -444,14 +452,6 @@ def multi_finalize(fn, d):
444 logger.debug("Appending .bbappend file %s to %s", append, fn) 452 logger.debug("Appending .bbappend file %s to %s", append, fn)
445 bb.parse.BBHandler.handle(append, d, True) 453 bb.parse.BBHandler.handle(append, d, True)
446 454
447 while True:
448 inherits = d.getVar('__BBDEFINHERITS', False) or []
449 if not inherits:
450 break
451 inherit, filename, lineno = inherits.pop(0)
452 d.setVar('__BBDEFINHERITS', inherits)
453 bb.parse.BBHandler.inherit(inherit, filename, lineno, d, deferred=True)
454
455 onlyfinalise = d.getVar("__ONLYFINALISE", False) 455 onlyfinalise = d.getVar("__ONLYFINALISE", False)
456 456
457 safe_d = d 457 safe_d = d
@@ -487,7 +487,9 @@ def multi_finalize(fn, d):
487 d.setVar("BBEXTENDVARIANT", variantmap[name]) 487 d.setVar("BBEXTENDVARIANT", variantmap[name])
488 else: 488 else:
489 d.setVar("PN", "%s-%s" % (pn, name)) 489 d.setVar("PN", "%s-%s" % (pn, name))
490 bb.parse.BBHandler.inherit(extendedmap[name], fn, 0, d) 490 inherits = d.getVar('__BBDEFINHERITS', False) or []
491 inherits.append((extendedmap[name], fn, 0))
492 d.setVar('__BBDEFINHERITS', inherits)
491 493
492 safe_d.setVar("BBCLASSEXTEND", extended) 494 safe_d.setVar("BBCLASSEXTEND", extended)
493 _create_variants(datastores, extendedmap.keys(), extendfunc, onlyfinalise) 495 _create_variants(datastores, extendedmap.keys(), extendfunc, onlyfinalise)