]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: siggen: Use unique hashes for tasks
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Jul 2019 15:58:14 +0000 (16:58 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Jul 2019 08:31:48 +0000 (09:31 +0100)
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>
bitbake/lib/bb/siggen.py

index 3b017219ed1b4016fa6bb78aaac814e1653d543d..f9c4798e3d7bca4aa2297f467f4165a13e5e1e6c 100644 (file)
@@ -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"""