aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/data.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-26 16:16:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-26 16:29:03 +0100
commit5e9d0911cd86e980ab310cc0d79c9383fbc2c844 (patch)
tree680230fd8ff78cdb833c98e74c232f305999dde6 /lib/bb/data.py
parenta4cd4c56284812efb2a2bc0c8667ddad073f8e94 (diff)
downloadbitbake-5e9d0911cd86e980ab310cc0d79c9383fbc2c844.tar.gz
data: Revert expandKeys warning move
This was incorrect, it *must* be done next to the rename as a previous may overlap with the current one and we need to detect this case. I'll add a test case to better catch this problem in future. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r--lib/bb/data.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py
index f8dc976a1..439c36593 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -156,17 +156,16 @@ def expandKeys(alterdata, readdata = None):
if key == ekey:
continue
todolist[key] = ekey
- newval = alterdata.getVar(ekey, 0)
- if newval is not None:
- val = alterdata.getVar(key, 0)
- if val is not None:
- bb.warn("Variable key %s (%s) replaces original key %s (%s)." % (key, val, ekey, newval))
# These two for loops are split for performance to maximise the
# usefulness of the expand cache
-
for key in todolist:
ekey = todolist[key]
+ newval = alterdata.getVar(ekey, 0)
+ if newval is not None:
+ val = alterdata.getVar(key, 0)
+ if val is not None:
+ bb.warn("Variable key %s (%s) replaces original key %s (%s)." % (key, val, ekey, newval))
alterdata.renameVar(key, ekey)
def inheritFromOS(d, savedenv, permitted):