summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-15 17:59:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-18 10:06:26 +0100
commit4cd5647f125f61a45d3145b54277471fa1a31433 (patch)
tree61a8727471fc98e968f27318f16c2ecaaf26f9ff /bitbake/lib
parent0ef16f083eddb0eccd5fd1604e6e922a38705ae5 (diff)
downloadpoky-4cd5647f125f61a45d3145b54277471fa1a31433.tar.gz
bitbake: cache/ast: Move __VARIANTS handling to parse cache function
Simple refactoring to allow for multiconfig support. (Bitbake rev: 266b848da40904446eb1d084bbdc5307a9b45197) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cache.py6
-rw-r--r--bitbake/lib/bb/parse/ast.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index c09f9296bd..658f30ff59 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -401,14 +401,18 @@ class Cache(object):
401 infos = [] 401 infos = []
402 datastores = cls.load_bbfile(filename, appends, configdata) 402 datastores = cls.load_bbfile(filename, appends, configdata)
403 depends = [] 403 depends = []
404 variants = []
405 # Process the "real" fn last so we can store variants list
404 for variant, data in sorted(datastores.items(), 406 for variant, data in sorted(datastores.items(),
405 key=lambda i: i[0], 407 key=lambda i: i[0],
406 reverse=True): 408 reverse=True):
407 virtualfn = cls.realfn2virtual(filename, variant) 409 virtualfn = cls.realfn2virtual(filename, variant)
410 variants.append(variant)
408 depends = depends + (data.getVar("__depends", False) or []) 411 depends = depends + (data.getVar("__depends", False) or [])
409 if depends and not variant: 412 if depends and not variant:
410 data.setVar("__depends", depends) 413 data.setVar("__depends", depends)
411 414 if virtualfn == filename:
415 data.setVar("__VARIANTS", " ".join(variants))
412 info_array = [] 416 info_array = []
413 for cache_class in caches_array: 417 for cache_class in caches_array:
414 info = cache_class(filename, data) 418 info = cache_class(filename, data)
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index 8b9baa764c..0fc3a9e7a4 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -469,9 +469,5 @@ def multi_finalize(fn, d):
469 except bb.parse.SkipRecipe as e: 469 except bb.parse.SkipRecipe as e:
470 datastores[variant].setVar("__SKIPPED", e.args[0]) 470 datastores[variant].setVar("__SKIPPED", e.args[0])
471 471
472 if len(datastores) > 1:
473 variants = filter(None, datastores.keys())
474 safe_d.setVar("__VARIANTS", " ".join(variants))
475
476 datastores[""] = d 472 datastores[""] = d
477 return datastores 473 return datastores