aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/siggen.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-04 11:27:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-04 11:27:12 +0000
commit39098b4ba2133f4d9229a0aa4fcf4c3e1291286a (patch)
tree264c3c60f13fd746c575dded7cb40be80e06251f /lib/bb/siggen.py
parent674692fd46a7691a1de59ace6af0556cc5dd6a71 (diff)
downloadbitbake-39098b4ba2133f4d9229a0aa4fcf4c3e1291286a.tar.gz
runqueue/siggen: Allow handling of equivalent hashes
Based on the hashserv's new ability to accept hash mappings, update runqueue to use this through a helper function in siggen. This addresses problems with meta-extsdk-toolchain and its dependency on gdb-cross which caused errors when building eSDK. See the previous commit for more details. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/siggen.py')
-rw-r--r--lib/bb/siggen.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index e19812b17..edf10105f 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -525,6 +525,32 @@ class SignatureGeneratorUniHashMixIn(object):
except OSError:
pass
+ def report_unihash_equiv(self, tid, taskhash, wanted_unihash, current_unihash, datacaches):
+ try:
+ extra_data = {}
+ data = self.client().report_unihash_equiv(taskhash, self.method, wanted_unihash, extra_data)
+ bb.note('Reported task %s as unihash %s to %s (%s)' % (tid, wanted_unihash, self.server, str(data)))
+
+ if data is None:
+ bb.warn("Server unable to handle unihash report")
+ return False
+
+ finalunihash = data['unihash']
+
+ if finalunihash == current_unihash:
+ bb.note('Task %s unihash %s unchanged by server' % (tid, finalunihash))
+ elif finalunihash == wanted_unihash:
+ bb.note('Task %s unihash changed %s -> %s as wanted' % (tid, current_unihash, finalunihash))
+ self.set_unihash(tid, finalunihash)
+ return True
+ else:
+ # TODO: What to do here?
+ bb.note('Task %s unihash reported as unwanted hash %s' % (tid, finalunihash))
+
+ except hashserv.client.HashConnectionError as e:
+ bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e)))
+
+ return False
#
# Dummy class used for bitbake-selftest