diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-30 14:44:01 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-03 22:35:48 +0000 |
commit | 737c5b27bb8a9e861eb71c222dac3048dbbc6336 (patch) | |
tree | f0747943a4bc27e130b13793c97bf977f04b43aa /meta/lib/oe | |
parent | 3e108b70176dee3495f3afcea1c0c87cccf2a379 (diff) | |
download | poky-737c5b27bb8a9e861eb71c222dac3048dbbc6336.tar.gz |
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]
(From OE-Core rev: 523c093a882f6831ba75b5c4513837554d7e2414)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/sstatesig.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index ca3c6dfeaa..32a500552c 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
@@ -104,6 +104,7 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
104 | "").split() | 104 | "").split() |
105 | self.unlockedrecipes = { k: "" for k in self.unlockedrecipes } | 105 | self.unlockedrecipes = { k: "" for k in self.unlockedrecipes } |
106 | self.buildarch = data.getVar('BUILD_ARCH') | 106 | self.buildarch = data.getVar('BUILD_ARCH') |
107 | self._internal = False | ||
107 | pass | 108 | pass |
108 | 109 | ||
109 | def tasks_resolved(self, virtmap, virtpnmap, dataCache): | 110 | def tasks_resolved(self, virtmap, virtpnmap, dataCache): |
@@ -156,7 +157,12 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
156 | else: | 157 | else: |
157 | return super().get_taskhash(tid, deps, dataCache) | 158 | return super().get_taskhash(tid, deps, dataCache) |
158 | 159 | ||
160 | # get_taskhash will call get_unihash internally in the parent class, we | ||
161 | # need to disable our filter of it whilst this runs else | ||
162 | # incorrect hashes can be calculated. | ||
163 | self._internal = True | ||
159 | h = super().get_taskhash(tid, deps, dataCache) | 164 | h = super().get_taskhash(tid, deps, dataCache) |
165 | self._internal = False | ||
160 | 166 | ||
161 | (mc, _, task, fn) = bb.runqueue.split_tid_mcfn(tid) | 167 | (mc, _, task, fn) = bb.runqueue.split_tid_mcfn(tid) |
162 | 168 | ||
@@ -184,7 +190,9 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
184 | h_locked = self.lockedsigs[recipename][task][0] | 190 | h_locked = self.lockedsigs[recipename][task][0] |
185 | var = self.lockedsigs[recipename][task][1] | 191 | var = self.lockedsigs[recipename][task][1] |
186 | self.lockedhashes[tid] = h_locked | 192 | self.lockedhashes[tid] = h_locked |
187 | unihash = super().get_unihash(tid) | 193 | self._internal = True |
194 | unihash = self.get_unihash(tid) | ||
195 | self._internal = False | ||
188 | self.taskhash[tid] = h_locked | 196 | self.taskhash[tid] = h_locked |
189 | #bb.warn("Using %s %s %s" % (recipename, task, h)) | 197 | #bb.warn("Using %s %s %s" % (recipename, task, h)) |
190 | 198 | ||
@@ -199,7 +207,7 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
199 | return h | 207 | return h |
200 | 208 | ||
201 | def get_unihash(self, tid): | 209 | def get_unihash(self, tid): |
202 | if tid in self.lockedhashes and self.lockedhashes[tid]: | 210 | if tid in self.lockedhashes and self.lockedhashes[tid] and not self._internal: |
203 | return self.lockedhashes[tid] | 211 | return self.lockedhashes[tid] |
204 | return super().get_unihash(tid) | 212 | return super().get_unihash(tid) |
205 | 213 | ||