aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-30 14:44:01 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-03 22:35:19 +0000
commit523c093a882f6831ba75b5c4513837554d7e2414 (patch)
treef928fa4ec49bac33d6af3a58e3e83b92907eb4e1
parent2a76082363d189880613765ad339718e3614049d (diff)
downloadopenembedded-core-contrib-523c093a882f6831ba75b5c4513837554d7e2414.tar.gz
openembedded-core-contrib-523c093a882f6831ba75b5c4513837554d7e2414.tar.bz2
openembedded-core-contrib-523c093a882f6831ba75b5c4513837554d7e2414.zip
sstatesig: Fix locked signature handling with unihashes
get_taskhash will call get_unihash internally in the parent class. We need to disable our filter of it whilst this runs else incorrect hashes can be calculated. This is believed to be causing the locked signatures test to fail under some circumstances (depending on whether earlier hashes are being remapped). [YOCTO #13605] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/sstatesig.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index ca3c6dfeaa1..32a500552cd 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -104,6 +104,7 @@ class SignatureGeneratorOEBasicHashMixIn(object):
"").split()
self.unlockedrecipes = { k: "" for k in self.unlockedrecipes }
self.buildarch = data.getVar('BUILD_ARCH')
+ self._internal = False
pass
def tasks_resolved(self, virtmap, virtpnmap, dataCache):
@@ -156,7 +157,12 @@ class SignatureGeneratorOEBasicHashMixIn(object):
else:
return super().get_taskhash(tid, deps, dataCache)
+ # get_taskhash will call get_unihash internally in the parent class, we
+ # need to disable our filter of it whilst this runs else
+ # incorrect hashes can be calculated.
+ self._internal = True
h = super().get_taskhash(tid, deps, dataCache)
+ self._internal = False
(mc, _, task, fn) = bb.runqueue.split_tid_mcfn(tid)
@@ -184,7 +190,9 @@ class SignatureGeneratorOEBasicHashMixIn(object):
h_locked = self.lockedsigs[recipename][task][0]
var = self.lockedsigs[recipename][task][1]
self.lockedhashes[tid] = h_locked
- unihash = super().get_unihash(tid)
+ self._internal = True
+ unihash = self.get_unihash(tid)
+ self._internal = False
self.taskhash[tid] = h_locked
#bb.warn("Using %s %s %s" % (recipename, task, h))
@@ -199,7 +207,7 @@ class SignatureGeneratorOEBasicHashMixIn(object):
return h
def get_unihash(self, tid):
- if tid in self.lockedhashes and self.lockedhashes[tid]:
+ if tid in self.lockedhashes and self.lockedhashes[tid] and not self._internal:
return self.lockedhashes[tid]
return super().get_unihash(tid)