[oe] [PATCH] Bitbake filterProviders does not respect sorted priorities

Denys Dmytriyenko denis at denix.org
Mon Sep 21 22:43:58 UTC 2009


On Mon, Sep 21, 2009 at 04:07:40PM -0400, Chris Conroy wrote:
> Cross-posting to the OE list since I haven't heard anything from the
> bitbake list after posting this last week. The providers code ignores
> package priorities and as a result unexpected packages can get chosen
> when using overlays with different priority settings.

Nice. I usually enforce specific preferred providers when there are 
uncertainties, but it would be great to have it work properly even when
I forget to do that... :)

> Original message posted to bitbake mailing list:
> 
> I am using bitbake 1.8.13 within OE, and I ran into a problem today
> where the wrong package was being selected.
> 
> Digging into the problem, I found that the code that sorts packages does
> not respect the priority order.
> 
> By iterating over sortpkg_pn.keys() instead of pkg_pn.keys(), it
> produces the expected order based on the priorities I have set. Patch
> below:
> 
> diff --git a/lib/bb/providers.py b/lib/bb/providers.py
> index 8970fb3..6c1cf78 100644
> --- a/lib/bb/providers.py
> +++ b/lib/bb/providers.py
> @@ -191,7 +191,7 @@ def _filterProviders(providers, item, cfgData,
> dataCache):
>              eligible.append(preferred_versions[pn][1])
> 
>      # Now add latest verisons
> -    for pn in pkg_pn.keys():
> +    for pn in sortpkg_pn.keys():
>          if pn in preferred_versions and preferred_versions[pn][1]:
>              continue
>          preferred_versions[pn] = findLatestProvider(pn, cfgData,
> dataCache, sortpkg_pn[pn][0])
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel




More information about the Openembedded-devel mailing list