[poky] [PATCH 1/1] curl: fix native dependency

Richard Purdie rpurdie at linux.intel.com
Sun Nov 28 06:22:46 PST 2010


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.

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:

+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




More information about the poky mailing list