]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
sstatesig: Implement new siggen API
authorJoshua Watt <JPEWhacker@gmail.com>
Sun, 18 Feb 2024 20:08:30 +0000 (13:08 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 19 Feb 2024 11:57:25 +0000 (11:57 +0000)
Implements the new API required for querying unihashes in parallel

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/sstatesig.py

index 1b4380f21bc0915a55210fd2923d38cff77a0fe3..aa891ecf0a0730b2e333cabcf1084b74a2a6d5ce 100644 (file)
@@ -205,10 +205,10 @@ class SignatureGeneratorOEBasicHashMixIn(object):
             return self.lockedhashes[tid]
         return super().get_stampfile_hash(tid)
 
-    def get_unihash(self, tid):
+    def get_cached_unihash(self, tid):
         if tid in self.lockedhashes and self.lockedhashes[tid] and not self._internal:
             return self.lockedhashes[tid]
-        return super().get_unihash(tid)
+        return super().get_cached_unihash(tid)
 
     def dump_sigtask(self, fn, task, stampbase, runtime):
         tid = fn + ":" + task
@@ -326,6 +326,7 @@ class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.sigge
         self.method = data.getVar('SSTATE_HASHEQUIV_METHOD')
         if not self.method:
             bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set")
+        self.max_parallel = int(data.getVar('BB_HASHSERVE_MAX_PARALLEL') or 1)
 
 # Insert these classes into siggen's namespace so it can see and select them
 bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash