From d951aa40a04caec7303c37641e4ea1f9c47e8893 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 17 Dec 2010 12:15:48 -0700 Subject: Move LAYERDIR expansion hack into DataSmart (Bitbake rev: 40778a6e9e82c7ea4673a74fc19574430fa63e8d) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'bitbake/lib/bb/cooker.py') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 548273380..9c48194a6 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -502,19 +502,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) -- cgit v1.2.3