summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-04-10 10:50:16 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-05 15:52:36 +0100
commit9211fd9c375489c73924fd43f1f8a0da2c4290bb (patch)
tree6429434d0f2b810559333c330c609d546f83f5f2 /bitbake
parent8b32d408967e9f596a13bdc50093ebbe3ec435f6 (diff)
downloadpoky-9211fd9c375489c73924fd43f1f8a0da2c4290bb.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cache.py1
-rw-r--r--bitbake/lib/bb/parse/ast.py8
2 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index cdde3635ab..955b400622 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -294,6 +294,7 @@ class Cache(object):
294 294
295 logger.debug(1, "Parsing %s (full)", fn) 295 logger.debug(1, "Parsing %s (full)", fn)
296 296
297 cfgData.setVar("__ONLYFINALISE", virtual or "default")
297 bb_data = cls.load_bbfile(fn, appends, cfgData) 298 bb_data = cls.load_bbfile(fn, appends, cfgData)
298 return bb_data[virtual] 299 return bb_data[virtual]
299 300
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index b968db40b3..375dc61630 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -369,10 +369,13 @@ def multi_finalize(fn, d):
369 logger.debug(2, "Appending .bbappend file %s to %s", append, fn) 369 logger.debug(2, "Appending .bbappend file %s to %s", append, fn)
370 bb.parse.BBHandler.handle(append, d, True) 370 bb.parse.BBHandler.handle(append, d, True)
371 371
372 onlyfinalise = d.getVar("__ONLYFINALISE", False)
373
372 safe_d = d 374 safe_d = d
373 d = bb.data.createCopy(safe_d) 375 d = bb.data.createCopy(safe_d)
374 try: 376 try:
375 finalize(fn, d) 377 if not onlyfinalise or "default" in onlyfinalise:
378 finalize(fn, d)
376 except bb.parse.SkipPackage: 379 except bb.parse.SkipPackage:
377 bb.data.setVar("__SKIPPED", True, d) 380 bb.data.setVar("__SKIPPED", True, d)
378 datastores = {"": safe_d} 381 datastores = {"": safe_d}
@@ -434,7 +437,8 @@ def multi_finalize(fn, d):
434 for variant, variant_d in datastores.iteritems(): 437 for variant, variant_d in datastores.iteritems():
435 if variant: 438 if variant:
436 try: 439 try:
437 finalize(fn, variant_d, variant) 440 if not onlyfinalise or variant in onlyfinalise:
441 finalize(fn, variant_d, variant)
438 except bb.parse.SkipPackage: 442 except bb.parse.SkipPackage:
439 bb.data.setVar("__SKIPPED", True, variant_d) 443 bb.data.setVar("__SKIPPED", True, variant_d)
440 444