summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2013-03-19 15:28:51 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-10 13:06:44 +0100
commit05d4f94c25b14ca99a1df01030edc00125f95405 (patch)
treeacd760c0bf73aa915fcee64aa42cb85b497245bf /bitbake/lib/bb/data.py
parentac6392ad0902af5b3f532e73064f623c9cc670e7 (diff)
downloadpoky-05d4f94c25b14ca99a1df01030edc00125f95405.tar.gz
bitbake: data.py: Add a warning when expandKeys overwrites an existing key
When two variables are defined as: ${var} = "bar" foo = "foobar" The value of 'foo' when ${var} == foo becomes indeterminate. We want to warn a user when this situation has been encountered so they can take corrective actions. In the above example usually foo == bar, unless multilibs are enabled. Then ml-foo = "ml-foobar". (Bitbake rev: 7c568132c54a21161de28907159f902462f1e2bb) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 7047f48934..110666ca2b 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -158,6 +158,11 @@ def expandKeys(alterdata, readdata = None):
158 158
159 for key in todolist: 159 for key in todolist:
160 ekey = todolist[key] 160 ekey = todolist[key]
161 if ekey in keys(alterdata):
162 val = alterdata.getVar(key, 0)
163 newval = alterdata.getVar(ekey, 0)
164 if val is not None and newval is not None:
165 bb.warn("Variable key %s (%s) replaces original key %s (%s)." % (key, val, ekey, newval))
161 alterdata.renameVar(key, ekey) 166 alterdata.renameVar(key, ekey)
162 167
163def inheritFromOS(d, savedenv, permitted): 168def inheritFromOS(d, savedenv, permitted):