aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2006-01-19 20:11:08 +0000
committerHolger Hans Peter Freyther <zecke@selfish.org>2006-01-19 20:11:08 +0000
commitc33962d98ecb382a46189850598ce05f935085fc (patch)
treec53f6b6899fa04b35ce98ec890fb9f63a638f0ea /bin
parent000961421c2db3f08e2ee82f5cbdff8a747fac0d (diff)
downloadbitbake-c33962d98ecb382a46189850598ce05f935085fc.tar.gz
bitbake/bin/bitbake:
Patch by Richard Purdie to fix the selection of a preferred R provider
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbake29
1 files changed, 20 insertions, 9 deletions
diff --git a/bin/bitbake b/bin/bitbake
index 2d8798254..6dcf2f6fd 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -567,19 +567,21 @@ class BBCooker:
return self.addRunDeps(p, item , buildAllDeps)
eligible = self.filterProviders(all_p, item)
+ preferred = []
for p in eligible:
pn = self.status.pkg_fn[p]
- prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % pn, self.configuration.data, 1)
- if prefervar:
- if self.configuration.verbose:
- bb.note("selecting %s to satisfy runtime %s due to PREFERRED_PROVIDERS" % (pn, item))
- eligible.remove(p)
- eligible = [p] + eligible
- discriminated = True
- break
+ provides = self.status.pn_provides[pn]
+ for provide in provides:
+ prefervar = bb.data.getVar('PREFERRED_PROVIDER_%s' % provide, self.configuration.data, 1)
+ if prefervar == pn:
+ if self.configuration.verbose:
+ bb.note("selecting %s to satisfy runtime %s due to PREFERRED_PROVIDERS" % (pn, item))
+ eligible.remove(p)
+ eligible = [p] + eligible
+ preferred.append(p)
- if len(eligible) > 1 and discriminated == False:
+ if len(eligible) > 1 and len(preferred) == 0:
if item not in self.consider_msgs_cache:
providers_list = []
for fn in eligible:
@@ -588,6 +590,15 @@ class BBCooker:
bb.note("consider defining a PREFERRED_PROVIDER to match runtime %s" % item)
self.consider_msgs_cache.append(item)
+ if len(preferred) > 1:
+ if item not in self.consider_msgs_cache:
+ providers_list = []
+ for fn in preferred:
+ providers_list.append(self.status.pkg_fn[fn])
+ bb.note("multiple preferred providers are available (%s);" % ", ".join(providers_list))
+ bb.note("consider defining only one PREFERRED_PROVIDER to match runtime %s" % item)
+ self.consider_msgs_cache.append(item)
+
# run through the list until we find one that we can build
for fn in eligible:
bb.debug(2, "selecting %s to satisfy runtime %s" % (fn, item))