bitbake/ast.py: Only run finalise() for the specified variant
Allows the heavy finalise function to only be run for the case we're interested in when running tasks, saving some processing time. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
8b32d40896
commit
9211fd9c37
|
@ -294,6 +294,7 @@ class Cache(object):
|
|||
|
||||
logger.debug(1, "Parsing %s (full)", fn)
|
||||
|
||||
cfgData.setVar("__ONLYFINALISE", virtual or "default")
|
||||
bb_data = cls.load_bbfile(fn, appends, cfgData)
|
||||
return bb_data[virtual]
|
||||
|
||||
|
|
|
@ -369,10 +369,13 @@ def multi_finalize(fn, d):
|
|||
logger.debug(2, "Appending .bbappend file %s to %s", append, fn)
|
||||
bb.parse.BBHandler.handle(append, d, True)
|
||||
|
||||
onlyfinalise = d.getVar("__ONLYFINALISE", False)
|
||||
|
||||
safe_d = d
|
||||
d = bb.data.createCopy(safe_d)
|
||||
try:
|
||||
finalize(fn, d)
|
||||
if not onlyfinalise or "default" in onlyfinalise:
|
||||
finalize(fn, d)
|
||||
except bb.parse.SkipPackage:
|
||||
bb.data.setVar("__SKIPPED", True, d)
|
||||
datastores = {"": safe_d}
|
||||
|
@ -434,7 +437,8 @@ def multi_finalize(fn, d):
|
|||
for variant, variant_d in datastores.iteritems():
|
||||
if variant:
|
||||
try:
|
||||
finalize(fn, variant_d, variant)
|
||||
if not onlyfinalise or variant in onlyfinalise:
|
||||
finalize(fn, variant_d, variant)
|
||||
except bb.parse.SkipPackage:
|
||||
bb.data.setVar("__SKIPPED", True, variant_d)
|
||||
|
||||
|
|
Loading…
Reference in New Issue