summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/hashserv/client.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-04 11:21:21 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-11 11:06:22 +0000
commit1d0c73bd687b7aa79e412c7743d95c09bceee43e (patch)
tree6c9a734d90b1a88375ede9fa20b89a0feffb90b1 /bitbake/lib/hashserv/client.py
parent9151c84245882160fc4dff778cbfb88f38501a7c (diff)
downloadpoky-1d0c73bd687b7aa79e412c7743d95c09bceee43e.tar.gz
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: 0d154434ed8e3e88ad440a8dd21a164e72ba4ac5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 674692fd46a7691a1de59ace6af0556cc5dd6a71) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/hashserv/client.py')
-rw-r--r--bitbake/lib/hashserv/client.py8
1 files changed, 8 insertions, 0 deletions
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):
148 m['unihash'] = unihash 148 m['unihash'] = unihash
149 return self.send_message({'report': m}) 149 return self.send_message({'report': m})
150 150
151 def report_unihash_equiv(self, taskhash, method, unihash, extra={}):
152 self._set_mode(self.MODE_NORMAL)
153 m = extra.copy()
154 m['taskhash'] = taskhash
155 m['method'] = method
156 m['unihash'] = unihash
157 return self.send_message({'report-equiv': m})
158
151 def get_stats(self): 159 def get_stats(self):
152 self._set_mode(self.MODE_NORMAL) 160 self._set_mode(self.MODE_NORMAL)
153 return self.send_message({'get-stats': None}) 161 return self.send_message({'get-stats': None})