From f271a6773a4fb8cbf26acc3a050618cb81eda481 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 4 Dec 2019 11:21:21 +0000 Subject: bitbake: hashserv: Add support for equivalent hash reporting The reason for this should be recorded in the commit logs. Imagine you have a target recipe (e.g. meta-extsdk-toolchain) which depends on gdb-cross. sstate in OE-Core allows gdb-cross to have the same hash regardless of whether its built on x86 or arm. The outhash will be different. We need hashequiv to be able to adapt to the prescence of sstate artefacts for meta-extsdk-toolchain and allow the hashes to re-intersect, rather than trying to force a rebuild of meta-extsdk-toolchain. By this point in the build, it would have already been installed from sstate so the build needs to adapt. Equivalent hashes should be reported to the server as a taskhash that needs to map to an specific unihash. This patch adds API to the hashserv client/server to allow this. [Thanks to Joshua Watt for help with this patch] (Bitbake rev: 674692fd46a7691a1de59ace6af0556cc5dd6a71) Signed-off-by: Richard Purdie --- bitbake/lib/hashserv/client.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bitbake/lib/hashserv/client.py') diff --git a/bitbake/lib/hashserv/client.py b/bitbake/lib/hashserv/client.py index f65956617b..ae0cce9df4 100644 --- a/bitbake/lib/hashserv/client.py +++ b/bitbake/lib/hashserv/client.py @@ -148,6 +148,14 @@ class Client(object): m['unihash'] = unihash return self.send_message({'report': m}) + def report_unihash_equiv(self, taskhash, method, unihash, extra={}): + self._set_mode(self.MODE_NORMAL) + m = extra.copy() + m['taskhash'] = taskhash + m['method'] = method + m['unihash'] = unihash + return self.send_message({'report-equiv': m}) + def get_stats(self): self._set_mode(self.MODE_NORMAL) return self.send_message({'get-stats': None}) -- cgit v1.2.3-54-g00ecf