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.py37
1 files changed, 8 insertions, 29 deletions
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index d4fd1498b6..e31f967850 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -354,13 +354,8 @@ class TaskData:
354 self.add_provider_internal(cfgData, dataCache, item) 354 self.add_provider_internal(cfgData, dataCache, item)
355 except bb.providers.NoProvider: 355 except bb.providers.NoProvider:
356 if self.abort: 356 if self.abort:
357 if self.get_rdependees_str(item):
358 bb.msg.error(bb.msg.domain.Provider, "Nothing PROVIDES '%s' (but '%s' DEPENDS on or otherwise requires it)" % (item, self.get_dependees_str(item)))
359 else:
360 bb.msg.error(bb.msg.domain.Provider, "Nothing PROVIDES '%s'" % (item))
361 raise 357 raise
362 targetid = self.getbuild_id(item) 358 self.remove_buildtarget(self.getbuild_id(item))
363 self.remove_buildtarget(targetid)
364 359
365 self.mark_external_target(item) 360 self.mark_external_target(item)
366 361
@@ -375,11 +370,7 @@ class TaskData:
375 return 370 return
376 371
377 if not item in dataCache.providers: 372 if not item in dataCache.providers:
378 if self.get_rdependees_str(item): 373 bb.event.fire(bb.event.NoProvider(item, dependees=self.get_rdependees_str(item)), cfgData)
379 bb.msg.note(2, bb.msg.domain.Provider, "Nothing PROVIDES '%s' (but '%s' DEPENDS on or otherwise requires it)" % (item, self.get_dependees_str(item)))
380 else:
381 bb.msg.note(2, bb.msg.domain.Provider, "Nothing PROVIDES '%s'" % (item))
382 bb.event.fire(bb.event.NoProvider(item), cfgData)
383 raise bb.providers.NoProvider(item) 374 raise bb.providers.NoProvider(item)
384 375
385 if self.have_build_target(item): 376 if self.have_build_target(item):
@@ -391,8 +382,7 @@ class TaskData:
391 eligible = [p for p in eligible if not self.getfn_id(p) in self.failed_fnids] 382 eligible = [p for p in eligible if not self.getfn_id(p) in self.failed_fnids]
392 383
393 if not eligible: 384 if not eligible:
394 bb.msg.note(2, bb.msg.domain.Provider, "No buildable provider PROVIDES '%s' but '%s' DEPENDS on or otherwise requires it. Enable debugging and see earlier logs to find unbuildable providers." % (item, self.get_dependees_str(item))) 385 bb.event.fire(bb.event.NoProvider(item, dependees=self.get_dependees_str(item)), cfgData)
395 bb.event.fire(bb.event.NoProvider(item), cfgData)
396 raise bb.providers.NoProvider(item) 386 raise bb.providers.NoProvider(item)
397 387
398 if len(eligible) > 1 and foundUnique == False: 388 if len(eligible) > 1 and foundUnique == False:
@@ -400,8 +390,6 @@ class TaskData:
400 providers_list = [] 390 providers_list = []
401 for fn in eligible: 391 for fn in eligible:
402 providers_list.append(dataCache.pkg_fn[fn]) 392 providers_list.append(dataCache.pkg_fn[fn])
403 bb.msg.note(1, bb.msg.domain.Provider, "multiple providers are available for %s (%s);" % (item, ", ".join(providers_list)))
404 bb.msg.note(1, bb.msg.domain.Provider, "consider defining PREFERRED_PROVIDER_%s" % item)
405 bb.event.fire(bb.event.MultipleProviders(item, providers_list), cfgData) 393 bb.event.fire(bb.event.MultipleProviders(item, providers_list), cfgData)
406 self.consider_msgs_cache.append(item) 394 self.consider_msgs_cache.append(item)
407 395
@@ -431,16 +419,14 @@ class TaskData:
431 all_p = bb.providers.getRuntimeProviders(dataCache, item) 419 all_p = bb.providers.getRuntimeProviders(dataCache, item)
432 420
433 if not all_p: 421 if not all_p:
434 bb.msg.error(bb.msg.domain.Provider, "'%s' RDEPENDS/RRECOMMENDS or otherwise requires the runtime entity '%s' but it wasn't found in any PACKAGE or RPROVIDES variables" % (self.get_rdependees_str(item), item)) 422 bb.event.fire(bb.event.NoProvider(item, runtime=True, dependees=self.get_rdependees_str(item)), cfgData)
435 bb.event.fire(bb.event.NoProvider(item, runtime=True), cfgData)
436 raise bb.providers.NoRProvider(item) 423 raise bb.providers.NoRProvider(item)
437 424
438 eligible, numberPreferred = bb.providers.filterProvidersRunTime(all_p, item, cfgData, dataCache) 425 eligible, numberPreferred = bb.providers.filterProvidersRunTime(all_p, item, cfgData, dataCache)
439 eligible = [p for p in eligible if not self.getfn_id(p) in self.failed_fnids] 426 eligible = [p for p in eligible if not self.getfn_id(p) in self.failed_fnids]
440 427
441 if not eligible: 428 if not eligible:
442 bb.msg.error(bb.msg.domain.Provider, "'%s' RDEPENDS/RRECOMMENDS or otherwise requires the runtime entity '%s' but it wasn't found in any PACKAGE or RPROVIDES variables of any buildable targets.\nEnable debugging and see earlier logs to find unbuildable targets." % (self.get_rdependees_str(item), item)) 429 bb.event.fire(bb.event.NoProvider(item, runtime=True, dependees=self.get_rdependees_str(item)), cfgData)
443 bb.event.fire(bb.event.NoProvider(item, runtime=True), cfgData)
444 raise bb.providers.NoRProvider(item) 430 raise bb.providers.NoRProvider(item)
445 431
446 if len(eligible) > 1 and numberPreferred == 0: 432 if len(eligible) > 1 and numberPreferred == 0:
@@ -448,8 +434,6 @@ class TaskData:
448 providers_list = [] 434 providers_list = []
449 for fn in eligible: 435 for fn in eligible:
450 providers_list.append(dataCache.pkg_fn[fn]) 436 providers_list.append(dataCache.pkg_fn[fn])
451 bb.msg.note(2, bb.msg.domain.Provider, "multiple providers are available for runtime %s (%s);" % (item, ", ".join(providers_list)))
452 bb.msg.note(2, bb.msg.domain.Provider, "consider defining a PREFERRED_PROVIDER entry to match runtime %s" % item)
453 bb.event.fire(bb.event.MultipleProviders(item, providers_list, runtime=True), cfgData) 437 bb.event.fire(bb.event.MultipleProviders(item, providers_list, runtime=True), cfgData)
454 self.consider_msgs_cache.append(item) 438 self.consider_msgs_cache.append(item)
455 439
@@ -458,8 +442,6 @@ class TaskData:
458 providers_list = [] 442 providers_list = []
459 for fn in eligible: 443 for fn in eligible:
460 providers_list.append(dataCache.pkg_fn[fn]) 444 providers_list.append(dataCache.pkg_fn[fn])
461 bb.msg.note(2, bb.msg.domain.Provider, "multiple providers are available for runtime %s (top %s entries preferred) (%s);" % (item, numberPreferred, ", ".join(providers_list)))
462 bb.msg.note(2, bb.msg.domain.Provider, "consider defining only one PREFERRED_PROVIDER entry to match runtime %s" % item)
463 bb.event.fire(bb.event.MultipleProviders(item, providers_list, runtime=True), cfgData) 445 bb.event.fire(bb.event.MultipleProviders(item, providers_list, runtime=True), cfgData)
464 self.consider_msgs_cache.append(item) 446 self.consider_msgs_cache.append(item)
465 447
@@ -515,8 +497,9 @@ class TaskData:
515 self.fail_fnid(self.tasks_fnid[taskid], missing_list) 497 self.fail_fnid(self.tasks_fnid[taskid], missing_list)
516 498
517 if self.abort and targetid in self.external_targets: 499 if self.abort and targetid in self.external_targets:
518 bb.msg.error(bb.msg.domain.Provider, "Required build target '%s' has no buildable providers.\nMissing or unbuildable dependency chain was: %s" % (self.build_names_index[targetid], missing_list)) 500 target = self.build_names_index[targetid]
519 raise bb.providers.NoProvider 501 bb.msg.error(bb.msg.domain.Provider, "Required build target '%s' has no buildable providers.\nMissing or unbuildable dependency chain was: %s" % (target, missing_list))
502 raise bb.providers.NoProvider(target)
520 503
521 def remove_runtarget(self, targetid, missing_list = []): 504 def remove_runtarget(self, targetid, missing_list = []):
522 """ 505 """
@@ -548,10 +531,6 @@ class TaskData:
548 except bb.providers.NoProvider: 531 except bb.providers.NoProvider:
549 targetid = self.getbuild_id(target) 532 targetid = self.getbuild_id(target)
550 if self.abort and targetid in self.external_targets: 533 if self.abort and targetid in self.external_targets:
551 if self.get_rdependees_str(target):
552 bb.msg.error(bb.msg.domain.Provider, "Nothing PROVIDES '%s' (but '%s' DEPENDS on or otherwise requires it)" % (target, self.get_dependees_str(target)))
553 else:
554 bb.msg.error(bb.msg.domain.Provider, "Nothing PROVIDES '%s'" % (target))
555 raise 534 raise
556 self.remove_buildtarget(targetid) 535 self.remove_buildtarget(targetid)
557 for target in self.get_unresolved_run_targets(dataCache): 536 for target in self.get_unresolved_run_targets(dataCache):