[poky] [PATCH 1/1] curl: fix native dependency
Tian, Kevin
kevin.tian at intel.com
Sun Nov 28 21:26:54 PST 2010
>From: Richard Purdie
>Sent: Sunday, November 28, 2010 10:23 PM
>
>On Wed, 2010-11-17 at 16:26 +0800, Qing He wrote:
>> @@ -25,6 +24,10 @@ EXTRA_OECONF = "--with-zlib=${STAGING_LIBDIR}/../ \
>> --enable-crypto-auth \
>> "
>>
>> +EXTRA_OECONF_append = " --with-gnutls=${STAGING_LIBDIR}/../"
>> +EXTRA_OECONF_virtclass-native_append = " --without-gnutls"
>> +EXTRA_OECONF_virtclass-nativesdk_append = " --without-gnutls"
>> +
>> do_configure_prepend() {
>> sed -i s:OPT_GNUTLS/bin:OPT_GNUTLS:g configure.ac
>> }
>
>I'm going to push a fix but I wanted to note that the above is not
>correct. Let me walk through this since I expect various people find
>this confusing.
>
>EXTRA_OECONF_virtclass-native_append = "X"
>
>means append "X" to the variable EXTRA_OECONF_virtclass-native
>
>So as bitbake expands this,
>
>EXTRA_OECONF_virtclass-native = "X" (since EXTRA_OECONF_virtclass-native
>was empty)
>
>When bitbake expands overrides, the virtclass-native can be removed and
>this overwrites the original EXTRA_OECONF variable so EXTRA_OECONF
>becomes just X.
I guess this will not happen, since finalize() first expands override and then
handle append/prepend. In that way virtclass-native has been expanded before
append is handled, and thus finally we'll get a variable EXTRA_OECONF_virtclass-native
which ends up to mean nothing in the database. Is it true?
>
>Now taking:
>
>EXTRA_OECONF_append_virtclass-native = "X"
>
>This is different. In this case, when overrides are expanded, this
>becomes EXTRA_OECONF_append and then X is added to EXTRA_OECONF.
>
>If the virtclass-native is never expanded (not in OVERRIDES), the append
>is never "seen" by bitbake.
>
>Unfortunately rewriting the above to:
>
>EXTRA_OECONF_append = " --with-gnutls=${STAGING_LIBDIR}/../"
>EXTRA_OECONF_append_virtclass-native = " --without-gnutls"
>EXTRA_OECONF_append_virtclass-nativesdk = " --without-gnutls"
>
>doesn't help since we end up with two appends in the native/nativesdk
>cases. There is a way out of this though:
This also confuses me a bit. When virtclass-native is expanded, EXTRA_OECONF_append
is simply a variable. In that case the expanded value should override the 1st assignment
of EXTRA_OECONF_append, and then we should get:
EXTRA_OECONF_append = " --without-gnutls "
and then that's what we expect.
I guess I may still overlook something here, and really appreciate your explanation
on the whole flow which is helpful. :-)
Thanks
Kevin
>
>+CURLGNUTLS = " --with-gnutls=${STAGING_LIBDIR}/../"
>+CURLGNUTLS_virtclass-native = "--without-gnutls"
>+CURLGNUTLS_virtclass-nativesdk = "--without-gnutls"
>
>and then reference CURLGNUTLS in EXTRA_OECONF which is what my update
>does :)
>
>Cheers,
>
>Richard
>
>_______________________________________________
>poky mailing list
>poky at yoctoproject.org
>https://lists.yoctoproject.org/listinfo/poky
More information about the poky
mailing list