treewide: fix append/remove directives
As mentioned by I970e06ca6f9d0a9792af122eb25da1bb9a06f058, append and
remove directives with '+=' are no longer valid Yocto syntax and raise a
warning.
See https://git.yoctoproject.org/poky/tree/documentation/migration-guides/migration-3.5.rst#n40
One interesting caveat has to do with the difference between "append"
and "+=".
foo:append = "a"
foo:append = "b"
Results in `foo = "ab"`, but
foo += "a"
foo += "b"
Results in `foo = "a b"`. When `:append +=` is used it has behavior
like the `+=` operator. Therefore, in some cases we need to insert
additional whitespace after the `:append = "` to ensure concatenation
behaves as expected. I've manually reviewed the results to ensure there
is no ill side-effects from an additional space potentially being added.
Fix up the entire tree with the following one-liner (and similar for
`remove`):
git ls-files -- ':!:poky/**' ':!:meta-security/**' \
':!:meta-raspberrypi/**' ':!:meta-openembedded/**' \
| grep "\.bb" | xargs grep -l ":append.*+=" \
| xargs sed -i 's/:append\(.*\)+=\([^"]*\)" */:append\1=\2" /'
or ...
| xargs grep -l ":remove.*+=" \
| xargs sed -i "s/:remove\(.*\)+=/:remove\1=/"
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iea6235e7c76e252f4d473652957c2925f6b8845a
diff --git a/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native_%.bbappend b/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native_%.bbappend
index 0921a80..f369f7a 100644
--- a/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native_%.bbappend
@@ -1,7 +1,7 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-SRC_URI:append += "file://BootBlockAndHeader_GBS.xml"
-SRC_URI:append += "file://UbootHeader_GBS.xml"
+SRC_URI:append = " file://BootBlockAndHeader_GBS.xml"
+SRC_URI:append = " file://UbootHeader_GBS.xml"
# Prepare the Bootblock XMLs.
do_gbs_prepare_xmls() {
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
index c9a0c38..ab5eea7 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
@@ -8,18 +8,18 @@
INSTFMT_PRESENT = "phosphor-gpio-presence@{0}.service"
PRESENT_TGT = "multi-user.target"
FMT_PRESENT = "../${TMPL_PRESENT}:${PRESENT_TGT}.requires/${INSTFMT_PRESENT}"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-0.conf"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-1.conf"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-2.conf"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-3.conf"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-4.conf"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-5.conf"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-6.conf"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-7.conf"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-8.conf"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-9.conf"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-10.conf"
-SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs +="obmc/gpio/gpios-11.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-0.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-1.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-2.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-3.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-4.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-5.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-6.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-7.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-8.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-9.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-10.conf"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs =" obmc/gpio/gpios-11.conf"
GBS_OBMC_PRESENT_INSTANCES = "0 1 2 3 4 5 6 7 8 9 10 11"
SYSTEMD_LINK:${PN}-presence:append:gbs = " ${@compose_list(d, 'FMT_PRESENT', 'GBS_OBMC_PRESENT_INSTANCES')}"
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
index 723ac41..71367c9 100644
--- a/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
+++ b/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
@@ -19,7 +19,7 @@
GBS_ITEMSFMT = "ahb/apb/{0}.conf"
GBS_ITEMS += "${@compose_list(d, 'GBS_ITEMSFMT', 'GBS_NAMES')}"
-GBS_ITEMS:append:gbs += " iio-hwmon-battery.conf"
+GBS_ITEMS:append:gbs = " iio-hwmon-battery.conf"
ENVS = "obmc/hwmon/{0}"
SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs = " ${@compose_list(d, 'ENVS', 'GBS_ITEMS')}"