diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-04-14 14:30:09 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:33 +0100 |
commit | 323812513868a08f932705335fdb4fe62f828144 (patch) | |
tree | 3fb03f55c1ed4c86587b957c40f94c0f28adcfda /bitbake/lib/bb/cooker.py | |
parent | dc39ebe91eabc48517aaac98655e50c7b1702262 (diff) | |
download | openembedded-core-323812513868a08f932705335fdb4fe62f828144.tar.gz openembedded-core-323812513868a08f932705335fdb4fe62f828144.tar.bz2 openembedded-core-323812513868a08f932705335fdb4fe62f828144.zip |
Add a hack to avoid the req that all vars using LAYERDIR be immediately expanded
See the comment in the code for details.
(Bitbake rev: 849dbd63244cbc4eaca0f1beedbb67baca024629)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index eab95d0336..7a19740cc8 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -523,11 +523,25 @@ class BBCooker: layers = (bb.data.getVar('BBLAYERS', data, True) or "").split() + data = bb.data.createCopy(data) for layer in layers: bb.msg.debug(2, bb.msg.domain.Parsing, "Adding layer %s" % layer) bb.data.setVar('LAYERDIR', layer, data) data = bb.parse.handle(os.path.join(layer, "conf", "layer.conf"), data) + # XXX: Hack, relies on the local keys of the datasmart + # instance being stored in the 'dict' attribute and makes + # assumptions about how variable expansion works, but + # there's no better way to force an expansion of a single + # variable across the datastore today, and this at least + # lets us reference LAYERDIR without having to immediately + # eval all our variables that use it. + for key in data.dict: + if key != "_data": + value = data.getVar(key, False) + if "${LAYERDIR}" in value: + data.setVar(key, value.replace("${LAYERDIR}", layer)) + bb.data.delVar('LAYERDIR', data) if not data.getVar("BBPATH", True): |