summaryrefslogtreecommitdiffstats
path: root/bitbake
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
parent43c670accc077d4fc2b52382a45d4bf745285253 (diff)
downloadpoky-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')
-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):
91 basehash = {} 91 basehash = {}
92 92
93 for task in tasklist: 93 for task in tasklist:
94 data = d.getVar(task, False) 94 data = lookupcache[task]
95 lookupcache[task] = data
96 95
97 if data is None: 96 if data is None:
98 bb.error("Task %s from %s seems to be empty?!" % (task, fn)) 97 bb.error("Task %s from %s seems to be empty?!" % (task, fn))
@@ -115,16 +114,8 @@ class SignatureGeneratorBasic(SignatureGenerator):
115 alldeps = sorted(seen) 114 alldeps = sorted(seen)
116 for dep in alldeps: 115 for dep in alldeps:
117 data = data + dep 116 data = data + dep
118 if dep in lookupcache: 117 var = lookupcache[dep]
119 var = lookupcache[dep] 118 if var is not None:
120 elif dep[-1] == ']':
121 vf = dep[:-1].split('[')
122 var = d.getVarFlag(vf[0], vf[1], False)
123 lookupcache[dep] = var
124 else:
125 var = d.getVar(dep, False)
126 lookupcache[dep] = var
127 if var:
128 data = data + str(var) 119 data = data + str(var)
129 self.basehash[fn + "." + task] = hashlib.md5(data).hexdigest() 120 self.basehash[fn + "." + task] = hashlib.md5(data).hexdigest()
130 taskdeps[task] = alldeps 121 taskdeps[task] = alldeps