From: Denys Dmytriyenko <denis@denix.org>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH] Bitbake filterProviders does not respect sorted priorities
Date: Mon, 21 Sep 2009 18:43:58 -0400 [thread overview]
Message-ID: <20090921224358.GG3599@denix.org> (raw)
In-Reply-To: <1253563660.4551.12.camel@conroy-linux>
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@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
next prev parent reply other threads:[~2009-09-21 22:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-21 20:07 [PATCH] Bitbake filterProviders does not respect sorted priorities Chris Conroy
2009-09-21 22:43 ` Denys Dmytriyenko [this message]
2009-09-22 6:45 ` Holger Hans Peter Freyther
2009-09-22 10:27 ` Florian Boor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090921224358.GG3599@denix.org \
--to=denis@denix.org \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox