[oe] [RFC] Stop on multiple providers but none explicitly specified

Richard Purdie rpurdie at rpsys.net
Thu May 15 21:45:32 UTC 2008


On Thu, 2008-05-15 at 20:51 +0200, Leon Woestenberg wrote:
> On Thu, May 15, 2008 at 6:42 PM, Richard Purdie <rpurdie at rpsys.net> wrote:
> > Bitbake will pick one, the options in brackets are in the order bitbake
> > will choose them. We sort them alphabetically iirc since that is more
> > deterministic than depending on parsing order which was the previous
> > approach.
>
> I agree it's more deterministic seen from the BitBake point-of-view
> and that's an improvement.
> 
> However, is it intuitive from the *user's* point-of-view to have
> BitBake make this decision?
> I think not; at least in the case of OpenEmbedded, there is at least a
> 50% chance this is not what the user intended.

You're making this sound clear cut and its not quite that easy :).
Firstly, 50% isn't a good figure, there is no limit to the number of
different packages which provide a given target so it could be 33%, 25%
or worse.

Secondly, there often is a good default choice its just bitbake doesn't
have the information to make it. For example, we'd probably all agree
that we'd like bitbake to by default:

Use uclibc for linux-uclibc/linux-uclibcgnueabi builds to satisfy virtual/libc
Use glibc for linux/linux-gnueabi builds to satisfy virtual/libc
Use libx11 to satisfy virtual/libx11

I guess what we could do is give each provider a PROVIDER_PREFERENCE =
"0". glibc then does:

PROVIDER_PREFERENCE_virtual/libc_linux = "1"
PROVIDER_PREFERENCE_virtual/libc_linux-gnueabi = "1"

uclibc does:

PROVIDER_PREFERENCE_virtual/libc_linux-uclibc = "1"
PROVIDER_PREFERENCE_virtual/libc_linux-uclibcgnueabi = "1"

libx11 does:

PROVIDER_PREFERENCE_virtual/libx11 = "1"

etc. and then it becomes a case of having bitbake use this information.
It would then be able to error if more that one entry had the highest
preference for a given provider and yet the sane defaults should work.
This should also mean no specific distro setup is needed yet the distro
can set PREFERRED_PROVIDER statements which override the above
PREFERENCES if wanted.

Does that make sense?

Cheers,

Richard





More information about the Openembedded-devel mailing list