summaryrefslogtreecommitdiffstats
path: root/bitbake/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>2020-01-11 11:06:22 +0000
commitb8f326a7783ab9b0298f2f55323744482dddbe0b (patch)
tree53c13008f5aad7173860cc14635f13ba79bb16e2 /bitbake/lib/bb/siggen.py
parent1d0c73bd687b7aa79e412c7743d95c09bceee43e (diff)
downloadpoky-b8f326a7783ab9b0298f2f55323744482dddbe0b.tar.gz
bitbake: 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. (Bitbake rev: 222df6d6b832868c6e87334f8acdd74b730a91d6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 39098b4ba2133f4d9229a0aa4fcf4c3e1291286a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/siggen.py')
-rw-r--r--bitbake/lib/bb/siggen.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index e19812b17c..edf10105f9 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -525,6 +525,32 @@ class SignatureGeneratorUniHashMixIn(object):
525 except OSError: 525 except OSError:
526 pass 526 pass
527 527
528 def report_unihash_equiv(self, tid, taskhash, wanted_unihash, current_unihash, datacaches):
529 try:
530 extra_data = {}
531 data = self.client().report_unihash_equiv(taskhash, self.method, wanted_unihash, extra_data)
532 bb.note('Reported task %s as unihash %s to %s (%s)' % (tid, wanted_unihash, self.server, str(data)))
533
534 if data is None:
535 bb.warn("Server unable to handle unihash report")
536 return False
537
538 finalunihash = data['unihash']
539
540 if finalunihash == current_unihash:
541 bb.note('Task %s unihash %s unchanged by server' % (tid, finalunihash))
542 elif finalunihash == wanted_unihash:
543 bb.note('Task %s unihash changed %s -> %s as wanted' % (tid, current_unihash, finalunihash))
544 self.set_unihash(tid, finalunihash)
545 return True
546 else:
547 # TODO: What to do here?
548 bb.note('Task %s unihash reported as unwanted hash %s' % (tid, finalunihash))
549
550 except hashserv.client.HashConnectionError as e:
551 bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e)))
552
553 return False
528 554
529# 555#
530# Dummy class used for bitbake-selftest 556# Dummy class used for bitbake-selftest