* [PATCH] Bitbake filterProviders does not respect sorted priorities
@ 2009-09-21 20:07 Chris Conroy
2009-09-21 22:43 ` Denys Dmytriyenko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Chris Conroy @ 2009-09-21 20:07 UTC (permalink / raw)
To: OE-Dev
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.
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])
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] Bitbake filterProviders does not respect sorted priorities
2009-09-21 20:07 [PATCH] Bitbake filterProviders does not respect sorted priorities Chris Conroy
@ 2009-09-21 22:43 ` Denys Dmytriyenko
2009-09-22 6:45 ` Holger Hans Peter Freyther
2009-09-22 10:27 ` Florian Boor
2 siblings, 0 replies; 4+ messages in thread
From: Denys Dmytriyenko @ 2009-09-21 22:43 UTC (permalink / raw)
To: openembedded-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Bitbake filterProviders does not respect sorted priorities
2009-09-21 20:07 [PATCH] Bitbake filterProviders does not respect sorted priorities Chris Conroy
2009-09-21 22:43 ` Denys Dmytriyenko
@ 2009-09-22 6:45 ` Holger Hans Peter Freyther
2009-09-22 10:27 ` Florian Boor
2 siblings, 0 replies; 4+ messages in thread
From: Holger Hans Peter Freyther @ 2009-09-22 6:45 UTC (permalink / raw)
To: openembedded-devel
On Monday 21 September 2009 22:07:40 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.
>
> 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:
Thanks again, I had hoped Richard would be able to comment. One of the biggest
problems with bitbake is that the only regression testing possible is trying
to build things, your description looks sound.
It would be great if someone could test and I'm happy to apply it then.
holger
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Bitbake filterProviders does not respect sorted priorities
2009-09-21 20:07 [PATCH] Bitbake filterProviders does not respect sorted priorities Chris Conroy
2009-09-21 22:43 ` Denys Dmytriyenko
2009-09-22 6:45 ` Holger Hans Peter Freyther
@ 2009-09-22 10:27 ` Florian Boor
2 siblings, 0 replies; 4+ messages in thread
From: Florian Boor @ 2009-09-22 10:27 UTC (permalink / raw)
To: openembedded-devel
Hi,
Chris Conroy schrieb:
> 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.
I agree... would be good to see this fixed.
Anyone from the bitbake developers who can comment on the patch? It looks quite
trivial :-)
Greetings
Florian
--
The dream of yesterday Florian Boor
is the hope of today Tel: +49 271-771091-15
and the reality of tomorrow. Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904] florian.boor@kernelconcepts.de
http://www.kernelconcepts.de/en
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-22 19:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-21 20:07 [PATCH] Bitbake filterProviders does not respect sorted priorities Chris Conroy
2009-09-21 22:43 ` Denys Dmytriyenko
2009-09-22 6:45 ` Holger Hans Peter Freyther
2009-09-22 10:27 ` Florian Boor
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.