Skip to contentSkip to conversation

libarchive: replace += with _append for appending to OVERRIDES variables

PATCH In review Ming Liu 2 participants 6 messages Oct 20, 2013

lore
Share & tools
lore

Ming Liu

author
#0 lore raw

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
index 1842bf7..3bcb7fb 100644
@@ -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
author
#1 lore raw

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
index 4189f78..c7c5d68 100644
@@ -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
author
#2 lore raw

PATCH 3/4 strace: replace += with _append for appending to OVERRIDES variables

In reply to 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.

---
 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
index 79a4ad7..aad53b7 100644
@@ -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
#3 lore raw

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.

---
 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
index 79a4ad7..aad53b7 100644

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]
author
#4 lore raw

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.

---
  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
index 79a4ad7..aad53b7 100644

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?

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

author
#5 lore raw

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
index 2b2b668..9a21976 100644
@@ -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