diff options
author | Richard Purdie <richard@openedhand.com> | 2008-05-04 23:22:24 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-05-04 23:22:24 +0000 |
commit | d6addd4969585745e0c4cf528b44cee1489edc88 (patch) | |
tree | 0fc9f712c46efad5d1a868bbb776c2c6135f8aa1 /bitbake/lib/bb/providers.py | |
parent | cd4e4786995706fb046345823eac9219c900683d (diff) | |
download | poky-d6addd4969585745e0c4cf528b44cee1489edc88.tar.gz |
bitbake: Sync with 1.8 branch upstream for PREFERRED_PROVIDERS message improvements and BB_STAMP_WHITELIST functionality
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4411 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/providers.py')
-rw-r--r-- | bitbake/lib/bb/providers.py | 8 |
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): | |||
283 | 283 | ||
284 | # Should use dataCache.preferred here? | 284 | # Should use dataCache.preferred here? |
285 | preferred = [] | 285 | preferred = [] |
286 | preferred_vars = [] | ||
286 | for p in eligible: | 287 | for p in eligible: |
287 | pn = dataCache.pkg_fn[p] | 288 | pn = dataCache.pkg_fn[p] |
288 | provides = dataCache.pn_provides[pn] | 289 | provides = dataCache.pn_provides[pn] |
289 | for provide in provides: | 290 | for provide in provides: |
290 | prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % provide, cfgData, 1) | 291 | prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % provide, cfgData, 1) |
291 | if prefervar == pn: | 292 | if prefervar == pn: |
292 | bb.msg.note(2, bb.msg.domain.Provider, "selecting %s to satisfy runtime %s due to PREFERRED_PROVIDERS" % (pn, item)) | 293 | var = "PREFERRED_PROVIDERS_%s = %s" % (provide, prefervar) |
294 | bb.msg.note(2, bb.msg.domain.Provider, "selecting %s to satisfy runtime %s due to %s" % (pn, item, var)) | ||
295 | preferred_vars.append(var) | ||
293 | eligible.remove(p) | 296 | eligible.remove(p) |
294 | eligible = [p] + eligible | 297 | eligible = [p] + eligible |
295 | preferred.append(p) | 298 | preferred.append(p) |
@@ -297,6 +300,9 @@ def filterProvidersRunTime(providers, item, cfgData, dataCache): | |||
297 | 300 | ||
298 | numberPreferred = len(preferred) | 301 | numberPreferred = len(preferred) |
299 | 302 | ||
303 | if numberPreferred > 1: | ||
304 | 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)) | ||
305 | |||
300 | bb.msg.debug(1, bb.msg.domain.Provider, "sorted providers for %s are: %s" % (item, eligible)) | 306 | bb.msg.debug(1, bb.msg.domain.Provider, "sorted providers for %s are: %s" % (item, eligible)) |
301 | 307 | ||
302 | return eligible, numberPreferred | 308 | return eligible, numberPreferred |