[oe-commits] [openembedded-core] 02/04: sstatesig: Adpat to recent bitbake hash equiv runqueue changes
git at git.openembedded.org
git at git.openembedded.org
Fri Jul 26 07:42:46 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 481917fdb8fc91c7283f701412b807295dafa978
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Jul 23 21:58:24 2019 +0100
sstatesig: Adpat to recent bitbake hash equiv runqueue changes
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oe/sstatesig.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index b057dd2..cfa6472 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -277,7 +277,6 @@ class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHash):
self.method = data.getVar('SSTATE_HASHEQUIV_METHOD')
if not self.method:
bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set")
- self.unihashes = bb.persist_data.persist('SSTATESIG_UNIHASH_CACHE_v1_' + self.method.replace('.', '_'), data)
def get_taskdata(self):
return (self.server, self.method) + super().get_taskdata()
@@ -296,12 +295,15 @@ class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHash):
# If a unique hash is reported, use it as the stampfile hash. This
# ensures that if a task won't be re-run if the taskhash changes,
# but it would result in the same output hash
- unihash = self.unihashes.get(self.__get_task_unihash_key(task))
+ unihash = self.unitaskhashes.get(self.__get_task_unihash_key(task), None)
if unihash is not None:
return unihash
return super().get_stampfile_hash(task)
+ def set_unihash(self, task, unihash):
+ self.unitaskhashes[self.__get_task_unihash_key(task)] = unihash
+
def get_unihash(self, task):
import urllib
import json
@@ -312,7 +314,7 @@ class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHash):
# TODO: This cache can grow unbounded. It probably only needs to keep
# for each task
- unihash = self.unihashes.get(key)
+ unihash = self.unitaskhashes.get(key, None)
if unihash is not None:
return unihash
@@ -354,7 +356,7 @@ class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHash):
except (KeyError, json.JSONDecodeError) as e:
bb.warn('Poorly formatted response from %s: %s' % (self.server, str(e)))
- self.unihashes[key] = unihash
+ self.unitaskhashes[key] = unihash
return unihash
def report_unihash(self, path, task, d):
@@ -372,7 +374,7 @@ class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHash):
key = fn + '.do_' + task + ':' + taskhash
# Sanity checks
- cache_unihash = self.unihashes.get(key)
+ cache_unihash = self.unitaskhashes.get(key, None)
if cache_unihash is None:
bb.fatal('%s not in unihash cache. Please report this error' % key)
@@ -423,6 +425,7 @@ class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHash):
if new_unihash != unihash:
bb.debug(1, 'Task %s unihash changed %s -> %s by server %s' % (taskhash, unihash, new_unihash, self.server))
+ bb.event.fire(bb.runqueue.taskUniHashUpdate(fn + ':do_' + task, new_unihash), d)
else:
bb.debug(1, 'Reported task %s as unihash %s to %s' % (taskhash, unihash, self.server))
except urllib.error.URLError as e:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list