aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/siggen.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-11 16:58:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-15 09:31:44 +0100
commit8ede873ef4ef492fbaf01474685c1ca8b34d80d5 (patch)
tree7cb77af7d0d8bb792dc5ca998ca77eb13552054c /lib/bb/siggen.py
parent7d486d3fb7176a3486f3f2484457724d7185df58 (diff)
downloadbitbake-8ede873ef4ef492fbaf01474685c1ca8b34d80d5.tar.gz
siggen: Use unique hashes for tasks
Now that runqueue optimises based on task hash, we need to ensure tasks have unique hashes even in the simplest siggen mode. Use the task name to calculate a unique hash. This fixes runqueue tests when hash optimisations are added. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/siggen.py')
-rw-r--r--lib/bb/siggen.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 3b017219e..f9c4798e3 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -49,8 +49,9 @@ class SignatureGenerator(object):
return self.taskhash[task]
def get_taskhash(self, fn, task, deps, dataCache):
- self.taskhash[fn + "." + task] = "0"
- return self.taskhash[fn + "." + task]
+ k = fn + "." + task
+ self.taskhash[k] = hashlib.sha256(k.encode("utf-8")).hexdigest()
+ return self.taskhash[k]
def writeout_file_checksum_cache(self):
"""Write/update the file checksum cache onto disk"""