aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r--lib/bb/cooker.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 68d07cb14..c8ca09980 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -500,19 +500,7 @@ class BBCooker:
parselog.debug(2, "Adding layer %s", layer)
bb.data.setVar('LAYERDIR', layer, data)
data = _parse(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 value and "${LAYERDIR}" in value:
- data.setVar(key, value.replace("${LAYERDIR}", layer))
+ data.expandVarref('LAYERDIR')
bb.data.delVar('LAYERDIR', data)