diff options
Diffstat (limited to 'bitbake/lib')
-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: | |||
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): |