[oe] PREFERRED_PROVIDER (was: Conditional Expressions in Python)

Detlef Vollmann dv at vollmann.ch
Sun Sep 9 18:25:53 UTC 2007


Dr. Michael Lauer wrote:
> DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial','virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']}"
> 
> Since Python 2.5, this can be written as:
> 
> DEPENDS = "${@'virtual/${TARGET_PREFIX}gcc' if 'nptl' in '${GLIBC_ADDONS}' else 'virtual/${TARGET_PREFIX}gcc-initial'}
Thanks for explaining these lines.
So, in my case (no NPTL), glibc is a provider of libc-for-gcc,
and I decided to put it as preferred provider into my local.conf
(actually it should go into my distro.conf, but that comes later...):
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}libc-for-gcc:glibc"

But what surprise, it still tried to build glibc-intermediate.
Looking into the log file, I found the following lines:
> DEBUG: providers for virtual/powerpc-angstrom-linux-libc-for-gcc are: ['glibc', 'glibc-intermediate', 'eglibc-intermediate']
> DEBUG: update_data()
> DEBUG: selecting /oe/own/packages/glibc/glibc_2.3.6.bb as PREFERRED_VERSION 2.3.6 of package glibc (for item virtual/powerpc-angstrom-linux-libc-for-gcc)
> DEBUG: update_data()
> DEBUG: selecting /oe/rep/org.openembedded.dev/packages/glibc/glibc-intermediate_2.5.bb as PREFERRED_VERSION 2.5 of package glibc-intermediate (for item virtual/powerpc-angstrom-linux-libc-for-gcc)
> DEBUG: update_data()
> NOTE: selecting glibc-intermediate to satisfy virtual/powerpc-angstrom-linux-libc-for-gcc due to PREFERRED_PROVIDERS
This last line is simply wrong:  I've searched the whole repository
and my overlay for respective lines, and the only file with such a
preferred provider would be openprotium.conf, and that file isn't read.

My first guess was that the version number 2.5 for glibc-intermediate
is higher than the 2.3.6 for glibc and it was preferred for that.
So I put back another line into my local.conf:
PREFERRED_VERSION_glibc-intermediate = "2.3.6"

But this didn't help.  The relevant lines from the log are now:
> DEBUG: Added dependency virtual/powerpc-angstrom-linux-libc-for-gcc for /oe/own/packages/gcc/gcc-cross_4.1.1.bb
> DEBUG: providers for virtual/powerpc-angstrom-linux-libc-for-gcc are: ['glibc', 'glibc-intermediate', 'eglibc-intermediate']
> DEBUG: update_data()
> DEBUG: selecting /oe/own/packages/glibc/glibc_2.3.6.bb as PREFERRED_VERSION 2.3.6 of package glibc (for item virtual/powerpc-angstrom-linux-libc-for-gcc)
> DEBUG: update_data()
> DEBUG: selecting /oe/own/packages/glibc/glibc-intermediate_2.3.6.bb as PREFERRED_VERSION 2.3.6 of package glibc-intermediate (for item virtual/powerpc-angstrom-linux-libc-for-gcc)
> DEBUG: update_data()
> NOTE: selecting glibc-intermediate to satisfy virtual/powerpc-angstrom-linux-libc-for-gcc due to PREFERRED_PROVIDERS
> DEBUG: adding /oe/own/packages/glibc/glibc-intermediate_2.3.6.bb to satisfy virtual/powerpc-angstrom-linux-libc-for-gcc

Does anybody have any idea why bitbake still believes that it
should use glibc-intermediate for libc-for-gcc?

  Detlef

-- 
Detlef Vollmann   vollmann engineering gmbh
Linux and C++ for Embedded Systems    http://www.vollmann.ch/




More information about the Openembedded-devel mailing list