[OE-core] [PATCH v2] mtd-utils: disable xattr if DISTRO_FEATURES doesn't contain acl

Huang, Jie (Jackie) Jackie.Huang at windriver.com
Wed Aug 26 09:50:13 UTC 2015



> -----Original Message-----
> From: openembedded-core-bounces at lists.openembedded.org [mailto:openembedded-core-
> bounces at lists.openembedded.org] On Behalf Of Andrea Adami
> Sent: Sunday, August 23, 2015 5:59 AM
> To: openembedded-core at lists.openembedded.org
> Subject: [OE-core] [PATCH v2] mtd-utils: disable xattr if DISTRO_FEATURES doesn't contain acl
> 
> After commit 24fde4d do_compile fails:
> 
> | mkfs.jffs2.c:70:21: fatal error: sys/acl.h: No such file or directory
> | #include <sys/acl.h>
> 
> This is a missing dependency on acl.
> To fix this we add a check to disable xattr when acl is not in DISTRO_FEATURES.

I think you should check the xattr distro feature, but only checking the DISTRO_FEATURES
can't ensure the dependency satisfied, why not use the PACKAGECONFIG, something like:

PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)}"
PACKAGECONFIG[xattr] = ", -DWITHOUT_XATTR,attr acl,"

Thanks,
Jackie


> 
> Signed-off-by: Andrea Adami <andrea.adami at gmail.com>
> ---
>  meta/recipes-devtools/mtd/mtd-utils_git.bb | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-
> utils_git.bb
> index 8d4892a..6a388c8 100644
> --- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
> +++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
> @@ -19,7 +19,8 @@ SRC_URI = "git://git.infradead.org/mtd-utils.git \
> 
>  S = "${WORKDIR}/git/"
> 
> -EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include'
> 'BUILDDIR=${S}'"
> +DISABLE_XATTR = "${@bb.utils.contains('DISTRO_FEATURES', 'acl', '', '-DWITHOUT_XATTR', d)}"
> +EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include
> ${DISABLE_XATTR}' 'BUILDDIR=${S}'"
> 
>  do_install () {
>  	oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir}
> INCLUDEDIR=${includedir}
> --
> 1.9.1
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list