[OE-core] [PATCH v2] libsolv: don't pick up bundled db from host rpm

Alexander Kanavin alexander.kanavin at linux.intel.com
Tue May 23 13:10:09 UTC 2017


On 05/23/2017 12:32 AM, Max Krummenacher wrote:
>> Sorry Max, this is actually worse than the first version. HAVE_RPM_DB_H
>> has to accurately reflect the presence or absence of the header, as that
>> header is later included or not included depending on that. You cannot
>> set it based on checking some library.
> Well, that is somewhat true.
> The test explicitly tests that the header file is available, but then
> implicitely assumes that when the header file is available no standalone
> needs be linked.
>
> Turning that assumption to explicitly test that rpm.so provides the db
> functionality and from that assuming that rpm/db.h is available is IMHO
> equally right or equally incomplete testing.

The first version of the patch assumes that rpm in oe-core is configured 
to use external db, and hardcodes that assumption.

The second version of the patch assumes that both the library and the 
header are available at the same time. This may be true right now when 
building with bitbake, it is certainly not true in other situations.

I would rather make assumptions about oe-core content, rather than 
bitbake behaviour.

>> So please either fix CHECK_INCLUDE_FILE,
> The reason why I didn't fix it as follows is that this would break
> the test for the non native (target and nativesdk) case.
>
> +  CHECK_INCLUDE_FILE(rpm/db.h HAVE_RPM_DB_H "-nostdinc")
>
> For the non native case the OE rpm headers are actually stored in
> the compiler's standard include path, so searching for rpm/db.h
> with -nostdinc wouldn't pick up the file even if it would exist.

This is not the fix I meant. You are fixing the *use* of 
CHECK_INCLUDE_FILE, but I wanted you to fix the internal content of 
CHECK_INCLUDE_FILE itself, so that it behaves correctly in 
bitbake-driven environment, and does not go out to check host machine 
include paths.

It's fine if the code to be fixed is too arcane or tricky and you cannot 
do it, then let's just revert to the first version of the patch.

Alex



More information about the Openembedded-core mailing list