]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: data: Revert expandKeys warning move
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 26 May 2015 15:16:45 +0000 (16:16 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 May 2015 09:17:16 +0000 (10:17 +0100)
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.

(Bitbake rev: 5e9d0911cd86e980ab310cc0d79c9383fbc2c844)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/data.py

index f8dc976a1c8f0972c2dab93778e1acf020cf01f4..439c36593d9d12234c9a211e4c26e8121d324b23 100644 (file)
@@ -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):