diff options
| author | Chris Larson <chris_larson@mentor.com> | 2010-12-17 12:15:48 -0700 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:52 +0000 |
| commit | d951aa40a04caec7303c37641e4ea1f9c47e8893 (patch) | |
| tree | fa1aba21b3d3a1f80992aaabc4c3905d3b9e0179 /bitbake/lib/bb/cooker.py | |
| parent | 717f13d63cb904ce48533d3f1b2b00d278741f6f (diff) | |
| download | poky-d951aa40a04caec7303c37641e4ea1f9c47e8893.tar.gz | |
Move LAYERDIR expansion hack into DataSmart
(Bitbake rev: 40778a6e9e82c7ea4673a74fc19574430fa63e8d)
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, 1 insertions, 13 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 548273380f..9c48194a61 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -502,19 +502,7 @@ class BBCooker: | |||
| 502 | parselog.debug(2, "Adding layer %s", layer) | 502 | parselog.debug(2, "Adding layer %s", layer) |
| 503 | bb.data.setVar('LAYERDIR', layer, data) | 503 | bb.data.setVar('LAYERDIR', layer, data) |
| 504 | data = _parse(os.path.join(layer, "conf", "layer.conf"), data) | 504 | data = _parse(os.path.join(layer, "conf", "layer.conf"), data) |
| 505 | 505 | data.expandVarref('LAYERDIR') | |
| 506 | # XXX: Hack, relies on the local keys of the datasmart | ||
| 507 | # instance being stored in the 'dict' attribute and makes | ||
| 508 | # assumptions about how variable expansion works, but | ||
| 509 | # there's no better way to force an expansion of a single | ||
| 510 | # variable across the datastore today, and this at least | ||
| 511 | # lets us reference LAYERDIR without having to immediately | ||
| 512 | # eval all our variables that use it. | ||
| 513 | for key in data.dict: | ||
| 514 | if key != "_data": | ||
| 515 | value = data.getVar(key, False) | ||
| 516 | if value and "${LAYERDIR}" in value: | ||
| 517 | data.setVar(key, value.replace("${LAYERDIR}", layer)) | ||
| 518 | 506 | ||
| 519 | bb.data.delVar('LAYERDIR', data) | 507 | bb.data.delVar('LAYERDIR', data) |
| 520 | 508 | ||
