summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-25 08:53:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-26 10:33:06 +0100
commita32937c50178a3437d59323644c8b76fa56f6657 (patch)
treee5c591e0309de822b5a3bc1f01794ed5a9e8cf48 /bitbake/lib/bb/data.py
parent9e9d05205ab0aab374c5688c1c6d8e21b175aba2 (diff)
downloadpoky-a32937c50178a3437d59323644c8b76fa56f6657.tar.gz
bitbake: data: Move warning code to the first loop for performance
By doing this we can take advantage of the expansion cache before starting write operations on the data store. (Bitbake rev: 702b42a47904f2378dd819e7463b3206883c2651) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 82eefef1a6..218998a0af 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -156,17 +156,17 @@ def expandKeys(alterdata, readdata = None):
156 if key == ekey: 156 if key == ekey:
157 continue 157 continue
158 todolist[key] = ekey 158 todolist[key] = ekey
159 newval = alterdata.getVar(ekey, 0)
160 if newval:
161 val = alterdata.getVar(key, 0)
162 if val is not None and newval is not None:
163 bb.warn("Variable key %s (%s) replaces original key %s (%s)." % (key, val, ekey, newval))
159 164
160 # These two for loops are split for performance to maximise the 165 # These two for loops are split for performance to maximise the
161 # usefulness of the expand cache 166 # usefulness of the expand cache
162 167
163 for key in todolist: 168 for key in todolist:
164 ekey = todolist[key] 169 ekey = todolist[key]
165 newval = alterdata.getVar(ekey, 0)
166 if newval:
167 val = alterdata.getVar(key, 0)
168 if val is not None and newval is not None:
169 bb.warn("Variable key %s (%s) replaces original key %s (%s)." % (key, val, ekey, newval))
170 alterdata.renameVar(key, ekey) 170 alterdata.renameVar(key, ekey)
171 171
172def inheritFromOS(d, savedenv, permitted): 172def inheritFromOS(d, savedenv, permitted):