aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/siggen.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-16 07:18:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-17 14:11:03 +0100
commitc971868360bfe089af2f42956a691b29c755db10 (patch)
tree929520edd491b27cf037bee3c91824f7162310fb /bitbake/lib/bb/siggen.py
parent43c670accc077d4fc2b52382a45d4bf745285253 (diff)
downloadopenembedded-core-contrib-c971868360bfe089af2f42956a691b29c755db10.tar.gz
bitbake: siggen: Use lookup cache exclusively
All the values we need are already guaranteed to be in the lookupcache so rather than fetch variables again, just use the cache. This gives a small performance improvement and simplifies the code. (Bitbake rev: 8ffaba61da7f195d7c3b64dce35b6a56272aecae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/siggen.py')
-rw-r--r--bitbake/lib/bb/siggen.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index fb8b678508..c15ba28ead 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -91,8 +91,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
basehash = {}
for task in tasklist:
- data = d.getVar(task, False)
- lookupcache[task] = data
+ data = lookupcache[task]
if data is None:
bb.error("Task %s from %s seems to be empty?!" % (task, fn))
@@ -115,16 +114,8 @@ class SignatureGeneratorBasic(SignatureGenerator):
alldeps = sorted(seen)
for dep in alldeps:
data = data + dep
- if dep in lookupcache:
- var = lookupcache[dep]
- elif dep[-1] == ']':
- vf = dep[:-1].split('[')
- var = d.getVarFlag(vf[0], vf[1], False)
- lookupcache[dep] = var
- else:
- var = d.getVar(dep, False)
- lookupcache[dep] = var
- if var:
+ var = lookupcache[dep]
+ if var is not None:
data = data + str(var)
self.basehash[fn + "." + task] = hashlib.md5(data).hexdigest()
taskdeps[task] = alldeps