Skip to contentSkip to conversation

siggen: Remove broken optimisation

PATCH New Richard Purdie 1 participant 1 message Nov 2, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 siggen: Remove broken optimisation

When a single signature is locked, dependent task checksum calculations fail. This in turn is because get_unihash cannot be cached correctly by this function. Remove that has turned out to be a poor optimisation to avoid that bug.

---
 lib/bb/siggen.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
lib/bb/siggen.py +1 -7
index 86e0e16f39..0ac3952466 100644
@@ -311,13 +311,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
 
         data = self.basehash[tid]
         for dep in self.runtaskdeps[tid]:
-            if dep in self.unihash:
-                if self.unihash[dep] is None:
-                    data = data + self.taskhash[dep]
-                else:
-                    data = data + self.unihash[dep]
-            else:
-                data = data + self.get_unihash(dep)
+            data = data + self.get_unihash(dep)
 
         for (f, cs) in self.file_checksum_values[tid]:
             if cs:
Signature · 1 line
2.25.1