libarchive: replace += with _append for appending to OVERRIDES variables
PATCH 1/4 libarchive: replace += with _append for appending to OVERRIDES variables
In some cases, it's unfit to use "+=" in a conditional appending, we would end up with the variable being set rather than being appended, which is not it mean to.
--- meta/recipes-extended/libarchive/libarchive_2.8.5.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-extended/libarchive/libarchive_2.8.5.bb +2 -2
@@ -7,13 +7,13 @@ PR = "r0" PACKAGECONFIG ?= "libxml2 zlib bz2" -PACKAGECONFIG_class-target += "\ +PACKAGECONFIG_append_class-target = "\ ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ ${@base_contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \ ${@base_contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \ " -PACKAGECONFIG_class-nativesdk += "largefile" +PACKAGECONFIG_append_class-nativesdk = " largefile" PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
Signature · 1 line
1.8.4.1
PATCH 2/4 bzip2: replace += with _append for appending to OVERRIDES variables
In some cases, it's unfit to use "+=" in a conditional appending, we would end up with the variable being set rather than being appended, which is not it mean to.
--- meta/recipes-extended/bzip2/bzip2_1.0.6.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/bzip2/bzip2_1.0.6.bb +1 -1
@@ -26,7 +26,7 @@ ALTERNATIVE_PRIORITY = "100" ALTERNATIVE_${PN} = "bunzip2 bzcat" #install binaries to bzip2-native under sysroot for replacement-native -EXTRA_OECONF_class-native += "--bindir=${STAGING_BINDIR_NATIVE}/${PN}" +EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}" do_configure_prepend () { cp ${WORKDIR}/configure.ac ${S}/ cp ${WORKDIR}/Makefile.am ${S}/
Signature · 1 line
1.8.4.1
PATCH 3/4 strace: replace += with _append for appending to OVERRIDES variables
In reply to Ming LiuIn some cases, it's unfit to use "+=" in a conditional appending, we would end up with the variable being set rather than being appended, which is not it mean to.
--- meta/recipes-devtools/strace/strace_4.8.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/strace/strace_4.8.bb +1 -1
@@ -19,7 +19,7 @@ inherit autotools ptest RDEPENDS_${PN}-ptest += "make" PACKAGECONFIG_class-target ?= "libaio" -PACKAGECONFIG_class-target += "${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" +PACKAGECONFIG_append_class-target = " ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" PACKAGECONFIG[libaio] = "--enable-aio,--disable-aio,libaio" PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
Signature · 1 line
1.8.4.1
Re: [PATCH 3/4] strace: replace += with _append for appending to OVERRIDES variables
Quoted 14 lines · Ming Liu
In some cases, it's unfit to use "+=" in a conditional appending, we would end up with the variable being set rather than being appended, which is not it mean to.
Signed-off-by Ming Liu <[email protected]>--- meta/recipes-devtools/strace/strace_4.8.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-devtools/strace/strace_4.8.bb +0
-0
meta/recipes-devtools/strace/strace_4.8.bb inherit autotools ptest · line 22
Quoted 5 lines
meta/recipes-devtools/strace/strace_4.8.bb +1
-1@@ -19,7 +19,7 @@ inherit autotools ptest RDEPENDS_${PN}-ptest += "make" PACKAGECONFIG_class-target ?= "libaio" -PACKAGECONFIG_class-target += "${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" +PACKAGECONFIG_append_class-target = " ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
Doesn't using _append make it unnecessary harder to changed default value in .bbappend?
Why not use
PACKAGECONFIG_class-target ?= "libaio ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" at least in this case?
Thanks
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCH 3/4] strace: replace += with _append for appending to OVERRIDES variables
Quoted 23 lines · Martin Jansa
Quoted 14 lines · Ming Liu
In some cases, it's unfit to use "+=" in a conditional appending, we would end up with the variable being set rather than being appended, which is not it mean to.
Signed-off-by Ming Liu <[email protected]>--- meta/recipes-devtools/strace/strace_4.8.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-devtools/strace/strace_4.8.bb +0
-0meta/recipes-devtools/strace/strace_4.8.bb inherit autotools ptest · line 22
Quoted 5 lines
meta/recipes-devtools/strace/strace_4.8.bb +1
-1@@ -19,7 +19,7 @@ inherit autotools ptest RDEPENDS_${PN}-ptest += "make" PACKAGECONFIG_class-target ?= "libaio" -PACKAGECONFIG_class-target += "${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" +PACKAGECONFIG_append_class-target = " ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"Doesn't using
_appendmake it unnecessary harder to changed default value in .bbappend?
Quoted 3 lines
Why not use
PACKAGECONFIG_class-target ?= "libaio ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" at least in this case?
Yes, it's reasonable and make things easy, I will do what you suggest in V1.
//Ming Liu
Quoted 3 lines
Thanks
PATCH 4/4 nss: don't need set SRC_URI with both += and _append
In reply to Ming Liu--- meta/recipes-support/nss/nss.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/nss/nss.inc +1 -1
@@ -17,7 +17,7 @@ SRC_URI = "\ file://nss-no-rpath-for-cross-compiling.patch \ file://nss-fix-incorrect-shebang-of-perl.patch \ " -SRC_URI_append_class-target += "\ +SRC_URI_append_class-target = "\ file://nss.pc.in \ file://signlibs.sh \ "
Signature · 1 line
1.8.4.1