summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/siggen.py27
1 files changed, 21 insertions, 6 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index f982bf22bc..ded1da020f 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -391,12 +391,16 @@ class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
391 bb.build.write_taint(task, d, fn) 391 bb.build.write_taint(task, d, fn)
392 392
393class SignatureGeneratorUniHashMixIn(object): 393class SignatureGeneratorUniHashMixIn(object):
394 def __init__(self, data):
395 self.extramethod = {}
396 super().__init__(data)
397
394 def get_taskdata(self): 398 def get_taskdata(self):
395 return (self.server, self.method) + super().get_taskdata() 399 return (self.server, self.method, self.extramethod) + super().get_taskdata()
396 400
397 def set_taskdata(self, data): 401 def set_taskdata(self, data):
398 self.server, self.method = data[:2] 402 self.server, self.method, self.extramethod = data[:3]
399 super().set_taskdata(data[2:]) 403 super().set_taskdata(data[3:])
400 404
401 def client(self): 405 def client(self):
402 if getattr(self, '_client', None) is None: 406 if getattr(self, '_client', None) is None:
@@ -453,7 +457,10 @@ class SignatureGeneratorUniHashMixIn(object):
453 unihash = taskhash 457 unihash = taskhash
454 458
455 try: 459 try:
456 data = self.client().get_unihash(self.method, self.taskhash[tid]) 460 method = self.method
461 if tid in self.extramethod:
462 method = method + self.extramethod[tid]
463 data = self.client().get_unihash(method, self.taskhash[tid])
457 if data: 464 if data:
458 unihash = data 465 unihash = data
459 # A unique hash equal to the taskhash is not very interesting, 466 # A unique hash equal to the taskhash is not very interesting,
@@ -522,7 +529,11 @@ class SignatureGeneratorUniHashMixIn(object):
522 extra_data['task'] = task 529 extra_data['task'] = task
523 extra_data['outhash_siginfo'] = sigfile.read().decode('utf-8') 530 extra_data['outhash_siginfo'] = sigfile.read().decode('utf-8')
524 531
525 data = self.client().report_unihash(taskhash, self.method, outhash, unihash, extra_data) 532 method = self.method
533 if tid in self.extramethod:
534 method = method + self.extramethod[tid]
535
536 data = self.client().report_unihash(taskhash, method, outhash, unihash, extra_data)
526 new_unihash = data['unihash'] 537 new_unihash = data['unihash']
527 538
528 if new_unihash != unihash: 539 if new_unihash != unihash:
@@ -549,7 +560,11 @@ class SignatureGeneratorUniHashMixIn(object):
549 def report_unihash_equiv(self, tid, taskhash, wanted_unihash, current_unihash, datacaches): 560 def report_unihash_equiv(self, tid, taskhash, wanted_unihash, current_unihash, datacaches):
550 try: 561 try:
551 extra_data = {} 562 extra_data = {}
552 data = self.client().report_unihash_equiv(taskhash, self.method, wanted_unihash, extra_data) 563 method = self.method
564 if tid in self.extramethod:
565 method = method + self.extramethod[tid]
566
567 data = self.client().report_unihash_equiv(taskhash, method, wanted_unihash, extra_data)
553 bb.note('Reported task %s as unihash %s to %s (%s)' % (tid, wanted_unihash, self.server, str(data))) 568 bb.note('Reported task %s as unihash %s to %s (%s)' % (tid, wanted_unihash, self.server, str(data)))
554 569
555 if data is None: 570 if data is None: