diff options
Diffstat (limited to 'bitbake/lib/bb/event.py')
-rw-r--r-- | bitbake/lib/bb/event.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 92ee3e92d4..59cca61424 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py | |||
@@ -521,6 +521,28 @@ class NoProvider(Event): | |||
521 | def isRuntime(self): | 521 | def isRuntime(self): |
522 | return self._runtime | 522 | return self._runtime |
523 | 523 | ||
524 | def __str__(self): | ||
525 | msg = '' | ||
526 | if self._runtime: | ||
527 | r = "R" | ||
528 | else: | ||
529 | r = "" | ||
530 | |||
531 | extra = '' | ||
532 | if not self._reasons: | ||
533 | if self._close_matches: | ||
534 | extra = ". Close matches:\n %s" % '\n '.join(self._close_matches) | ||
535 | |||
536 | if self._dependees: | ||
537 | msg = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s" % (r, self._item, ", ".join(self._dependees), r, extra) | ||
538 | else: | ||
539 | msg = "Nothing %sPROVIDES '%s'%s" % (r, self._item, extra) | ||
540 | if self._reasons: | ||
541 | for reason in self._reasons: | ||
542 | msg += '\n' + reason | ||
543 | return msg | ||
544 | |||
545 | |||
524 | class MultipleProviders(Event): | 546 | class MultipleProviders(Event): |
525 | """Multiple Providers""" | 547 | """Multiple Providers""" |
526 | 548 | ||
@@ -548,6 +570,16 @@ class MultipleProviders(Event): | |||
548 | """ | 570 | """ |
549 | return self._candidates | 571 | return self._candidates |
550 | 572 | ||
573 | def __str__(self): | ||
574 | msg = "Multiple providers are available for %s%s (%s)" % (self._is_runtime and "runtime " or "", | ||
575 | self._item, | ||
576 | ", ".join(self._candidates)) | ||
577 | rtime = "" | ||
578 | if self._is_runtime: | ||
579 | rtime = "R" | ||
580 | msg += "\nConsider defining a PREFERRED_%sPROVIDER entry to match %s" % (rtime, self._item) | ||
581 | return msg | ||
582 | |||
551 | class ParseStarted(OperationStarted): | 583 | class ParseStarted(OperationStarted): |
552 | """Recipe parsing for the runqueue has begun""" | 584 | """Recipe parsing for the runqueue has begun""" |
553 | def __init__(self, total): | 585 | def __init__(self, total): |