summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/siggen.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/siggen.py')
-rw-r--r--bitbake/lib/bb/siggen.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index c2d0c736cf..0357b544b5 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -16,6 +16,7 @@ from bb import runqueue
16import hashserv 16import hashserv
17 17
18logger = logging.getLogger('BitBake.SigGen') 18logger = logging.getLogger('BitBake.SigGen')
19hashequiv_logger = logging.getLogger('BitBake.SigGen.HashEquiv')
19 20
20def init(d): 21def init(d):
21 siggens = [obj for obj in globals().values() 22 siggens = [obj for obj in globals().values()
@@ -502,9 +503,9 @@ class SignatureGeneratorUniHashMixIn(object):
502 # A unique hash equal to the taskhash is not very interesting, 503 # A unique hash equal to the taskhash is not very interesting,
503 # so it is reported it at debug level 2. If they differ, that 504 # so it is reported it at debug level 2. If they differ, that
504 # is much more interesting, so it is reported at debug level 1 505 # is much more interesting, so it is reported at debug level 1
505 bb.debug((1, 2)[unihash == taskhash], 'Found unihash %s in place of %s for %s from %s' % (unihash, taskhash, tid, self.server)) 506 hashequiv_logger.debug((1, 2)[unihash == taskhash], 'Found unihash %s in place of %s for %s from %s' % (unihash, taskhash, tid, self.server))
506 else: 507 else:
507 bb.debug(2, 'No reported unihash for %s:%s from %s' % (tid, taskhash, self.server)) 508 hashequiv_logger.debug(2, 'No reported unihash for %s:%s from %s' % (tid, taskhash, self.server))
508 except hashserv.client.HashConnectionError as e: 509 except hashserv.client.HashConnectionError as e:
509 bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) 510 bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e)))
510 511
@@ -578,12 +579,12 @@ class SignatureGeneratorUniHashMixIn(object):
578 new_unihash = data['unihash'] 579 new_unihash = data['unihash']
579 580
580 if new_unihash != unihash: 581 if new_unihash != unihash:
581 bb.debug(1, 'Task %s unihash changed %s -> %s by server %s' % (taskhash, unihash, new_unihash, self.server)) 582 hashequiv_logger.debug(1, 'Task %s unihash changed %s -> %s by server %s' % (taskhash, unihash, new_unihash, self.server))
582 bb.event.fire(bb.runqueue.taskUniHashUpdate(fn + ':do_' + task, new_unihash), d) 583 bb.event.fire(bb.runqueue.taskUniHashUpdate(fn + ':do_' + task, new_unihash), d)
583 self.set_unihash(tid, new_unihash) 584 self.set_unihash(tid, new_unihash)
584 d.setVar('BB_UNIHASH', new_unihash) 585 d.setVar('BB_UNIHASH', new_unihash)
585 else: 586 else:
586 bb.debug(1, 'Reported task %s as unihash %s to %s' % (taskhash, unihash, self.server)) 587 hashequiv_logger.debug(1, 'Reported task %s as unihash %s to %s' % (taskhash, unihash, self.server))
587 except hashserv.client.HashConnectionError as e: 588 except hashserv.client.HashConnectionError as e:
588 bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) 589 bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e)))
589 finally: 590 finally:
@@ -606,7 +607,7 @@ class SignatureGeneratorUniHashMixIn(object):
606 method = method + self.extramethod[tid] 607 method = method + self.extramethod[tid]
607 608
608 data = self.client().report_unihash_equiv(taskhash, method, wanted_unihash, extra_data) 609 data = self.client().report_unihash_equiv(taskhash, method, wanted_unihash, extra_data)
609 bb.note('Reported task %s as unihash %s to %s (%s)' % (tid, wanted_unihash, self.server, str(data))) 610 hashequiv_logger.info('Reported task %s as unihash %s to %s (%s)' % (tid, wanted_unihash, self.server, str(data)))
610 611
611 if data is None: 612 if data is None:
612 bb.warn("Server unable to handle unihash report") 613 bb.warn("Server unable to handle unihash report")
@@ -615,14 +616,14 @@ class SignatureGeneratorUniHashMixIn(object):
615 finalunihash = data['unihash'] 616 finalunihash = data['unihash']
616 617
617 if finalunihash == current_unihash: 618 if finalunihash == current_unihash:
618 bb.note('Task %s unihash %s unchanged by server' % (tid, finalunihash)) 619 hashequiv_logger.info('Task %s unihash %s unchanged by server' % (tid, finalunihash))
619 elif finalunihash == wanted_unihash: 620 elif finalunihash == wanted_unihash:
620 bb.note('Task %s unihash changed %s -> %s as wanted' % (tid, current_unihash, finalunihash)) 621 hashequiv_logger.info('Task %s unihash changed %s -> %s as wanted' % (tid, current_unihash, finalunihash))
621 self.set_unihash(tid, finalunihash) 622 self.set_unihash(tid, finalunihash)
622 return True 623 return True
623 else: 624 else:
624 # TODO: What to do here? 625 # TODO: What to do here?
625 bb.note('Task %s unihash reported as unwanted hash %s' % (tid, finalunihash)) 626 hashequiv_logger.info('Task %s unihash reported as unwanted hash %s' % (tid, finalunihash))
626 627
627 except hashserv.client.HashConnectionError as e: 628 except hashserv.client.HashConnectionError as e:
628 bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) 629 bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e)))