diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-04 11:27:07 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-04 12:12:45 +0000 |
commit | 36e40ed24ff7cc0fdb7fd5230256edae7a3c7ade (patch) | |
tree | d33c37f2137aecdeecce872e79b6e5c7fb28bd7e /bitbake/lib/bb/siggen.py | |
parent | f271a6773a4fb8cbf26acc3a050618cb81eda481 (diff) | |
download | poky-36e40ed24ff7cc0fdb7fd5230256edae7a3c7ade.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: 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.py | 26 |
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 |