summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-14 14:30:09 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:33 +0100
commit323812513868a08f932705335fdb4fe62f828144 (patch)
tree3fb03f55c1ed4c86587b957c40f94c0f28adcfda /bitbake/lib
parentdc39ebe91eabc48517aaac98655e50c7b1702262 (diff)
downloadpoky-323812513868a08f932705335fdb4fe62f828144.tar.gz
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')
-rw-r--r--bitbake/lib/bb/cooker.py14
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:
523 523
524 layers = (bb.data.getVar('BBLAYERS', data, True) or "").split() 524 layers = (bb.data.getVar('BBLAYERS', data, True) or "").split()
525 525
526 data = bb.data.createCopy(data)
526 for layer in layers: 527 for layer in layers:
527 bb.msg.debug(2, bb.msg.domain.Parsing, "Adding layer %s" % layer) 528 bb.msg.debug(2, bb.msg.domain.Parsing, "Adding layer %s" % layer)
528 bb.data.setVar('LAYERDIR', layer, data) 529 bb.data.setVar('LAYERDIR', layer, data)
529 data = bb.parse.handle(os.path.join(layer, "conf", "layer.conf"), data) 530 data = bb.parse.handle(os.path.join(layer, "conf", "layer.conf"), data)
530 531
532 # XXX: Hack, relies on the local keys of the datasmart
533 # instance being stored in the 'dict' attribute and makes
534 # assumptions about how variable expansion works, but
535 # there's no better way to force an expansion of a single
536 # variable across the datastore today, and this at least
537 # lets us reference LAYERDIR without having to immediately
538 # eval all our variables that use it.
539 for key in data.dict:
540 if key != "_data":
541 value = data.getVar(key, False)
542 if "${LAYERDIR}" in value:
543 data.setVar(key, value.replace("${LAYERDIR}", layer))
544
531 bb.data.delVar('LAYERDIR', data) 545 bb.data.delVar('LAYERDIR', data)
532 546
533 if not data.getVar("BBPATH", True): 547 if not data.getVar("BBPATH", True):