summaryrefslogtreecommitdiffstats
path: root/bitbake
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:48 +0100
commit8a2914fc981668bf01768bc3050329c1254a74d6 (patch)
tree69c1d83b4f1d04a9fa9a1aff1f416c5ec1fc922b /bitbake
parenteb3ae4a13280cf2da43f7d63f08cb4cb4eebca9e (diff)
downloadpoky-8a2914fc981668bf01768bc3050329c1254a74d6.tar.gz
bitbake: 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. (Bitbake rev: 8ede873ef4ef492fbaf01474685c1ca8b34d80d5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/siggen.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 3b017219ed..f9c4798e3d 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -49,8 +49,9 @@ class SignatureGenerator(object):
49 return self.taskhash[task] 49 return self.taskhash[task]
50 50
51 def get_taskhash(self, fn, task, deps, dataCache): 51 def get_taskhash(self, fn, task, deps, dataCache):
52 self.taskhash[fn + "." + task] = "0" 52 k = fn + "." + task
53 return self.taskhash[fn + "." + task] 53 self.taskhash[k] = hashlib.sha256(k.encode("utf-8")).hexdigest()
54 return self.taskhash[k]
54 55
55 def writeout_file_checksum_cache(self): 56 def writeout_file_checksum_cache(self):
56 """Write/update the file checksum cache onto disk""" 57 """Write/update the file checksum cache onto disk"""