summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-08-09 13:52:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-16 11:21:02 +0100
commit840a427ed2943136fba60c721d19870c79dabe23 (patch)
tree95dd4603f8ebe514e8331704bb7fa5511c7acd95 /bitbake/lib/bb/ui
parentbaaa7adc168999bfe09e1f287608cc92f86ec0c0 (diff)
downloadpoky-840a427ed2943136fba60c721d19870c79dabe23.tar.gz
bitbake: taskdata: report close matches with NoProvider errors
Assuming there is no known reason why an item is not provided, show close matches on the assumption that it might have been a typo or other mistake. (Bitbake rev: ed81b0856b4a3892b53d39871eaaa6273390ea75) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r--bitbake/lib/bb/ui/crumbs/runningbuild.py10
-rw-r--r--bitbake/lib/bb/ui/knotty.py9
2 files changed, 15 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
index 78fa1417f5..abd3300149 100644
--- a/bitbake/lib/bb/ui/crumbs/runningbuild.py
+++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py
@@ -375,10 +375,16 @@ class RunningBuild (gobject.GObject):
375 r = "R" 375 r = "R"
376 else: 376 else:
377 r = "" 377 r = ""
378
379 extra = ''
380 if not event._reasons:
381 if event._close_matches:
382 extra = ". Close matches:\n %s" % '\n '.join(event._close_matches)
383
378 if event._dependees: 384 if event._dependees:
379 msg = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)\n" % (r, event._item, ", ".join(event._dependees), r) 385 msg = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s\n" % (r, event._item, ", ".join(event._dependees), r, extra)
380 else: 386 else:
381 msg = "Nothing %sPROVIDES '%s'\n" % (r, event._item) 387 msg = "Nothing %sPROVIDES '%s'%s\n" % (r, event._item, extra)
382 if event._reasons: 388 if event._reasons:
383 for reason in event._reasons: 389 for reason in event._reasons:
384 msg += ("%s\n" % reason) 390 msg += ("%s\n" % reason)
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 2c8293d985..09ad99ebe8 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -416,10 +416,15 @@ def main(server, eventHandler, params, tf = TerminalFilter):
416 else: 416 else:
417 r = "" 417 r = ""
418 418
419 extra = ''
420 if not event._reasons:
421 if event._close_matches:
422 extra = ". Close matches:\n %s" % '\n '.join(event._close_matches)
423
419 if event._dependees: 424 if event._dependees:
420 logger.error("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)", r, event._item, ", ".join(event._dependees), r) 425 logger.error("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s", r, event._item, ", ".join(event._dependees), r, extra)
421 else: 426 else:
422 logger.error("Nothing %sPROVIDES '%s'", r, event._item) 427 logger.error("Nothing %sPROVIDES '%s'%s", r, event._item, extra)
423 if event._reasons: 428 if event._reasons:
424 for reason in event._reasons: 429 for reason in event._reasons:
425 logger.error("%s", reason) 430 logger.error("%s", reason)