diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-02 16:37:58 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-03 22:35:48 +0000 |
| commit | 76af397213502b08ca296b08603bc8a23f3e52a2 (patch) | |
| tree | 5bf541d418fff0838beadf912e0b04d2cba2a045 /meta/lib/oe | |
| parent | 737c5b27bb8a9e861eb71c222dac3048dbbc6336 (diff) | |
| download | poky-76af397213502b08ca296b08603bc8a23f3e52a2.tar.gz | |
sstatesig: Avoid resetting taskhash within siggen for locked sigs
Since get_unihash uses taskhash as a key internally, changing it means
different bebahour when locked sigs are active verses not active. Under
corner cases this leads to a signature mismatch.
Avoid this by by adding a wrapper for the place its externally exposed
and then not changing the internals.
(From OE-Core rev: 23b7484d326cf7fac013384598d7745a042eaa75)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
| -rw-r--r-- | meta/lib/oe/sstatesig.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index 32a500552c..0e17ad6f5b 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
| @@ -193,7 +193,6 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
| 193 | self._internal = True | 193 | self._internal = True |
| 194 | unihash = self.get_unihash(tid) | 194 | unihash = self.get_unihash(tid) |
| 195 | self._internal = False | 195 | self._internal = False |
| 196 | self.taskhash[tid] = h_locked | ||
| 197 | #bb.warn("Using %s %s %s" % (recipename, task, h)) | 196 | #bb.warn("Using %s %s %s" % (recipename, task, h)) |
| 198 | 197 | ||
| 199 | if h != h_locked and h_locked != unihash: | 198 | if h != h_locked and h_locked != unihash: |
| @@ -206,6 +205,11 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
| 206 | #bb.warn("%s %s %s" % (recipename, task, h)) | 205 | #bb.warn("%s %s %s" % (recipename, task, h)) |
| 207 | return h | 206 | return h |
| 208 | 207 | ||
| 208 | def get_stampfile_hash(self, tid): | ||
| 209 | if tid in self.lockedhashes and self.lockedhashes[tid]: | ||
| 210 | return self.lockedhashes[tid] | ||
| 211 | return super().get_stampfile_hash(tid) | ||
| 212 | |||
| 209 | def get_unihash(self, tid): | 213 | def get_unihash(self, tid): |
| 210 | if tid in self.lockedhashes and self.lockedhashes[tid] and not self._internal: | 214 | if tid in self.lockedhashes and self.lockedhashes[tid] and not self._internal: |
| 211 | return self.lockedhashes[tid] | 215 | return self.lockedhashes[tid] |
