summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/taskdata.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/taskdata.py')
-rw-r--r--bitbake/lib/bb/taskdata.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index c08186a..58fe199 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -390,6 +390,17 @@ class TaskData:
390 reasons.append("%s PROVIDES %s but was skipped: %s" % (skipitem.pn, item, skipitem.skipreason)) 390 reasons.append("%s PROVIDES %s but was skipped: %s" % (skipitem.pn, item, skipitem.skipreason))
391 return reasons 391 return reasons
392 392
393 def get_close_matches(self, item, provider_list):
394 import difflib
395 if self.skiplist:
396 skipped = []
397 for fn in self.skiplist:
398 skipped.append(self.skiplist[fn].pn)
399 full_list = provider_list + skipped
400 else:
401 full_list = provider_list
402 return difflib.get_close_matches(item, full_list, cutoff=0.7)
403
393 def add_provider(self, cfgData, dataCache, item): 404 def add_provider(self, cfgData, dataCache, item):
394 try: 405 try:
395 self.add_provider_internal(cfgData, dataCache, item) 406 self.add_provider_internal(cfgData, dataCache, item)
@@ -411,7 +422,7 @@ class TaskData:
411 return 422 return
412 423
413 if not item in dataCache.providers: 424 if not item in dataCache.providers:
414 bb.event.fire(bb.event.NoProvider(item, dependees=self.get_dependees_str(item), reasons=self.get_reasons(item)), cfgData) 425 bb.event.fire(bb.event.NoProvider(item, dependees=self.get_dependees_str(item), reasons=self.get_reasons(item), close_matches=self.get_close_matches(item, dataCache.providers.keys())), cfgData)
415 raise bb.providers.NoProvider(item) 426 raise bb.providers.NoProvider(item)
416 427
417 if self.have_build_target(item): 428 if self.have_build_target(item):