From 840a427ed2943136fba60c721d19870c79dabe23 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 9 Aug 2013 13:52:05 +0000 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/knotty.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/ui/knotty.py') 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): else: r = "" + extra = '' + if not event._reasons: + if event._close_matches: + extra = ". Close matches:\n %s" % '\n '.join(event._close_matches) + if event._dependees: - logger.error("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)", r, event._item, ", ".join(event._dependees), r) + logger.error("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s", r, event._item, ", ".join(event._dependees), r, extra) else: - logger.error("Nothing %sPROVIDES '%s'", r, event._item) + logger.error("Nothing %sPROVIDES '%s'%s", r, event._item, extra) if event._reasons: for reason in event._reasons: logger.error("%s", reason) -- cgit v1.2.3-54-g00ecf