summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/providers.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/providers.py')
-rw-r--r--bitbake/lib/bb/providers.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py
index 2f6b620b3d..cb0ca3ff24 100644
--- a/bitbake/lib/bb/providers.py
+++ b/bitbake/lib/bb/providers.py
@@ -283,13 +283,16 @@ def filterProvidersRunTime(providers, item, cfgData, dataCache):
# Should use dataCache.preferred here?
preferred = []
+ preferred_vars = []
for p in eligible:
pn = dataCache.pkg_fn[p]
provides = dataCache.pn_provides[pn]
for provide in provides:
prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % provide, cfgData, 1)
if prefervar == pn:
- bb.msg.note(2, bb.msg.domain.Provider, "selecting %s to satisfy runtime %s due to PREFERRED_PROVIDERS" % (pn, item))
+ var = "PREFERRED_PROVIDERS_%s = %s" % (provide, prefervar)
+ bb.msg.note(2, bb.msg.domain.Provider, "selecting %s to satisfy runtime %s due to %s" % (pn, item, var))
+ preferred_vars.append(var)
eligible.remove(p)
eligible = [p] + eligible
preferred.append(p)
@@ -297,6 +300,9 @@ def filterProvidersRunTime(providers, item, cfgData, dataCache):
numberPreferred = len(preferred)
+ if numberPreferred > 1:
+ bb.msg.error(bb.msg.domain.Provider, "Conflicting PREFERRED_PROVIDERS entries were found which resulted in an attempt to select multiple providers (%s) for runtime dependecy %s\nThe entries resulting in this conflict were: %s" % (preferred, item, preferred_vars))
+
bb.msg.debug(1, bb.msg.domain.Provider, "sorted providers for %s are: %s" % (item, eligible))
return eligible, numberPreferred