Confusing and invalid conditional appends
v2 cover Confusing and invalid conditional appends
This patchset fixes several findings for variable assignments of form:
A:someoverride += "foo"
and transforms them into:
A:append:someoverride = " foo"
In most of those cases I assume the original intent was to have a conditional append, but what was actually happening was append to a conditional override.
I first noticed such problem in our internal recipes and bbappends, but then I decided to check if similar issue exists upstream and turns out it does.
In most places the override that was happening was harmless as there was no value that was being overriden, but that wasn't the case for libffi. Before patch:
$ grep EXTRA_OECONF /path/to/layers/openembedded-core/meta/recipes-support/libffi/libffi_3.5.2.bb
EXTRA_OECONF += "--disable-builddir --disable-exec-static-tramp"
EXTRA_OECONF:class-native += "--with-gcc-arch=generic"
$ bitbake-getvar -r libffi-native EXTRA_OECONF
#
# $EXTRA_OECONF [6 operations]
# set /path/to/layers/openembedded-core/meta/conf/bitbake.conf:590
# ""
# :append /path/to/layers/openembedded-core/meta/conf/distro/include/no-static-libs.inc:24
# "${DISABLE_STATIC}"
# set /path/to/layers/openembedded-core/meta/conf/documentation.conf:164
# [doc] "Additional configure script options."
# append /path/to/layers/openembedded-core/meta/recipes-support/libffi/libffi_3.5.2.bb:18
# "--disable-builddir --disable-exec-static-tramp"
# :append /path/to/layers/openembedded-core/meta/classes-recipe/autotools.bbclass:134
# " ${PACKAGECONFIG_CONFARGS}"
# override[class-native]:append /path/to/layers/openembedded-core/meta/recipes-support/libffi/libffi_3.5.2.bb:19
# "--with-gcc-arch=generic"
# pre-expansion value:
# " --with-gcc-arch=generic${DISABLE_STATIC} ${PACKAGECONFIG_CONFARGS}"
EXTRA_OECONF=" --with-gcc-arch=generic --disable-static "After patch:
$ grep EXTRA_OECONF /path/to/layers/openembedded-core/meta/recipes-support/libffi/libffi_3.5.2.bb
EXTRA_OECONF += "--disable-builddir --disable-exec-static-tramp"
EXTRA_OECONF:append:class-native = " --with-gcc-arch=generic"
$ bitbake-getvar -r libffi-native EXTRA_OECONF#
# $EXTRA_OECONF [6 operations]
# set /path/to/layers/openembedded-core/meta/conf/bitbake.conf:590
# ""
# :append /path/to/layers/openembedded-core/meta/conf/distro/include/no-static-libs.inc:24
# "${DISABLE_STATIC}"
# set /path/to/layers/openembedded-core/meta/conf/documentation.conf:164
# [doc] "Additional configure script options."
# append /path/to/layers/openembedded-core/meta/recipes-support/libffi/libffi_3.5.2.bb:18
# "--disable-builddir --disable-exec-static-tramp"
# :append[class-native] /path/to/layers/openembedded-core/meta/recipes-support/libffi/libffi_3.5.2.bb:19
# " --with-gcc-arch=generic"
# :append /path/to/layers/openembedded-core/meta/classes-recipe/autotools.bbclass:134
# " ${PACKAGECONFIG_CONFARGS}"
# pre-expansion value:
# " --disable-builddir --disable-exec-static-tramp${DISABLE_STATIC} --with-gcc-arch=generic ${PACKAGECONFIG_CONFARGS}"
EXTRA_OECONF=" --disable-builddir --disable-exec-static-tramp --disable-static --with-gcc-arch=generic "---
Changes in v2:
- Split initial single commit into smaller ones
- Described actual impact on the overriden variables
- Added some recipes that I missed last time
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Michal Sieron (12):
libffi: Fix invalid conditional append
coreutils: Convert confusing append to override syntax
expat: Convert confusing append to override syntax tune-power[567]: Remove confusing overrides
no-gplv3.inc: Convert confusing appends to override syntax
bootchart2: Convert confusing appends to override syntax
pigz: Convert confusing append to override syntax
systemtap: Convert confusing append to override syntax
ovmf: Convert confusing append to override syntax
dnf: Convert confusing append to override syntax
qemu: Convert confusing append to override syntax recipes-devtools/python: Convert confusing appends to override syntax
meta/conf/distro/include/no-gplv3.inc | 4 ++-- meta/conf/machine/include/powerpc/tune-power5.inc | 3 +-- meta/conf/machine/include/powerpc/tune-power6.inc | 3 +-- meta/conf/machine/include/powerpc/tune-power7.inc | 3 +-- meta/recipes-core/coreutils/coreutils_9.10.bb | 4 ++-- meta/recipes-core/expat/expat_2.7.4.bb | 2 +- meta/recipes-core/ovmf/ovmf_git.bb | 2 +- meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb | 10 +++++----- meta/recipes-devtools/dnf/dnf_4.24.0.bb | 2 +- meta/recipes-devtools/python/python3-asn1crypto_1.5.1.bb | 2 +- meta/recipes-devtools/python/python3-bcrypt_5.0.0.bb | 2 +- meta/recipes-devtools/python/python3-chardet_5.2.0.bb | 2 +- meta/recipes-devtools/python/python3-cython_3.2.4.bb | 4 ++-- meta/recipes-devtools/python/python3-ply_3.11.bb | 2 +- meta/recipes-devtools/python/python3-pyasn1_0.6.2.bb | 2 +- meta/recipes-devtools/python/python3-pycparser_3.0.bb | 4 ++-- meta/recipes-devtools/python/python3-pysocks_1.7.1.bb | 2 +- meta/recipes-devtools/python/python3-pytz_2025.2.bb | 2 +- meta/recipes-devtools/qemu/qemu_10.2.0.bb | 2 +- meta/recipes-extended/pigz/pigz_2.8.bb | 2 +- meta/recipes-kernel/systemtap/systemtap_5.4.bb | 2 +- meta/recipes-support/libffi/libffi_3.5.2.bb | 2 +- 22 files changed, 30 insertions(+), 33 deletions(-)
---
base-commit: f5e62a13cbe17947baa387c723422bc8ca766d34
change-id: 20260314-fix-invalid-appends-cf5197ef2f07
Best regards,
Signature · 1 line
Michal Sieron <[email protected]>
PATCH v2 1/12 libffi: Fix invalid conditional append
EXTRA_OECONF:class-native += was actually overriding previously set EXTRA_OECONF.
--- meta/recipes-support/libffi/libffi_3.5.2.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/libffi/libffi_3.5.2.bb +1 -1
@@ -16,7 +16,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BPN}-${PV}.tar.gz \ SRC_URI[sha256sum] = "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc" EXTRA_OECONF += "--disable-builddir --disable-exec-static-tramp" -EXTRA_OECONF:class-native += "--with-gcc-arch=generic" +EXTRA_OECONF:append:class-native = " --with-gcc-arch=generic" EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'" inherit autotools texinfo multilib_header github-releases
Signature · 1 line
2.53.0
Re: [OE-core] [PATCH v2 01/12] libffi: Fix invalid conditional append
Quoted 20 lines · Michal Sieron via lists.openembedded.org
EXTRA_OECONF:class-native +=was actually overriding previously setEXTRA_OECONF.Signed-off-by Michal Sieron <[email protected]>--- meta/recipes-support/libffi/libffi_3.5.2.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-support/libffi/libffi_3.5.2.bb +0
-0@@ -16,7 +16,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BPN}-${PV}.tar.gz \ SRC_URI[sha256sum] ="
f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc"
EXTRA_OECONF+= "--disable-builddir --disable-exec-static-tramp"
meta/recipes-support/libffi/libffi_3.5.2.bb SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BPN}-${PV}.tar.gz \ · line 19
Quoted 2 lines
meta/recipes-support/libffi/libffi_3.5.2.bb +1
-1-EXTRA_OECONF:class-native += "--with-gcc-arch=generic" +EXTRA_OECONF:append:class-native = " --with-gcc-arch=generic"
Usually we want to use default options for native builds and accidentally this was being done
when you fix it, I think it is better to assess that and see if it should be appended or it should be
overridden, In this case override seems more appropriate, making it
EXTRA_OECONF:class-native = "--with-gcc-arch=generic"
might be closer to intention.
EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
Quoted 18 lines
inherit autotools texinfo
multilib_headergithub-releases--
2.53.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#233274):
https://lists.openembedded.org/g/openembedded-core/message/233274
Mute This Topic: https://lists.openembedded.org/mt/118356433/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH v2 2/12 coreutils: Convert confusing append to override syntax
In reply to Michal Sieron:class-target overrides for PACKAGE_BEFORE_PN and RDEPENDS:coreutils were being appended to with the coreutils-stdbuf, but instead of being an append only for target builds, it was actually overriding those variables.
One could replace :class-target += with :append:class-target =, but I don't think there is actually any need for this to be :class-target specific. RPROVIDES:coreutils few lines below doesn't use that override.
--- meta/recipes-core/coreutils/coreutils_9.10.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/coreutils/coreutils_9.10.bb +2 -2
@@ -66,9 +66,9 @@ sbindir_progs = "chroot" # coreutils-stdbuf without getting the rest of coreutils, but make # coreutils itself pull in stdbuf, so IMAGE_INSTALL += "coreutils" # always provides all coreutils -PACKAGE_BEFORE_PN:class-target += "${@bb.utils.contains('PACKAGECONFIG', 'single-binary', '', 'coreutils-stdbuf', d)}" +PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'single-binary', '', 'coreutils-stdbuf', d)}" FILES:coreutils-stdbuf = "${bindir}/stdbuf ${libdir}/coreutils/libstdbuf.so" -RDEPENDS:coreutils:class-target += "${@bb.utils.contains('PACKAGECONFIG', 'single-binary', '', 'coreutils-stdbuf', d)}" +RDEPENDS:coreutils += "${@bb.utils.contains('PACKAGECONFIG', 'single-binary', '', 'coreutils-stdbuf', d)}" # However, when the single-binary PACKAGECONFIG is used, stdbuf # functionality is built into the single coreutils binary, so there's
Signature · 1 line
2.53.0
PATCH v2 3/12 expat: Convert confusing append to override syntax
In reply to Michal SieronWhile in this case EXTRA_OECMAKE:class-native += wouldn't result in any unwanted override, there is no guarantee there won't be a change, which would be hidden by this override. To avoid any surprises in the future let's use :append:class-native = syntax here.
--- meta/recipes-core/expat/expat_2.7.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/expat/expat_2.7.4.bb +1 -1
@@ -17,7 +17,7 @@ UPSTREAM_CHECK_REGEX = "releases/tag/R_(?P<pver>.+)" SRC_URI[sha256sum] = "e6af11b01e32e5ef64906a5cca8809eabc4beb7ff2f9a0e6aabbd42e825135d0" -EXTRA_OECMAKE:class-native += "-DEXPAT_BUILD_DOCS=OFF" +EXTRA_OECMAKE:append:class-native = " -DEXPAT_BUILD_DOCS=OFF" RDEPENDS:${PN}-ptest += "bash"
Signature · 1 line
2.53.0
Re: [OE-core] [PATCH v2 03/12] expat: Convert confusing append to override syntax
Quoted 21 lines · Michal Sieron via lists.openembedded.org
While in this case
EXTRA_OECMAKE:class-native +=wouldn't result in any unwanted override, there is no guarantee there won't be a change, which would be hidden by this override. To avoid any surprises in the future let's use:append:class-native =syntax here.Signed-off-by Michal Sieron <[email protected]>--- meta/recipes-core/expat/expat_2.7.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-core/expat/expat_2.7.4.bb +0
-0@@ -17,7 +17,7 @@ UPSTREAM_CHECK_REGEX = "releases/tag/R_(?P<pver>.+)" SRC_URI[sha256sum] ="
e6af11b01e32e5ef64906a5cca8809eabc4beb7ff2f9a0e6aabbd42e825135d0"
meta/recipes-core/expat/expat_2.7.4.bb UPSTREAM_CHECK_REGEX = "releases/tag/R_(?P<pver>.+)" · line 20
Quoted 2 lines
meta/recipes-core/expat/expat_2.7.4.bb +1
-1-EXTRA_OECMAKE:class-native += "-DEXPAT_BUILD_DOCS=OFF" +EXTRA_OECMAKE:append:class-native = " -DEXPAT_BUILD_DOCS=OFF"
This is the only EXTRA_OECMAKE setting in recipe. Perhaps just drop += here.
Quoted 19 lines
RDEPENDS:${PN}-ptest += "bash"
--
2.53.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#233276):
https://lists.openembedded.org/g/openembedded-core/message/233276
Mute This Topic: https://lists.openembedded.org/mt/118356435/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH v2 4/12 tune-power[567]: Remove confusing overrides
In reply to Michal SieronThe overrides for GLIBC_EXTRA_OECONF are confusing especially with combination with += style append. If there would be any value set prior, it would be overriden as for conditional append override style :append should be used.
As all other tune-power* configs append to GLIBC_EXTRA_OECONF without any override, let's align those to them and drop the override.
--- meta/conf/machine/include/powerpc/tune-power5.inc | 3 +-- meta/conf/machine/include/powerpc/tune-power6.inc | 3 +-- meta/conf/machine/include/powerpc/tune-power7.inc | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-)
meta/conf/machine/include/powerpc/tune-power5.inc +1 -2
@@ -17,8 +17,7 @@ TUNE_PKGARCH:tune-ppc64p5 = "ppc64p5" PACKAGE_EXTRA_ARCHS:tune-ppc64p5 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc64} ppc64p5" # glibc configure options to get power5 specific library -GLIBC_EXTRA_OECONF:powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'power5', '--with-cpu=power5', '', d)}" -GLIBC_EXTRA_OECONF:powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'power5', '--with-cpu=power5', '', d)}" +GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'power5', ' --with-cpu=power5', '', d)}" # QEMU usermode fails with invalid instruction error MACHINE_FEATURES_BACKFILL_CONSIDERED:append = "${@bb.utils.contains('TUNE_FEATURES', 'power5', ' qemu-usermode', '', d)}"
meta/conf/machine/include/powerpc/tune-power6.inc +1 -2
@@ -17,8 +17,7 @@ TUNE_PKGARCH:tune-ppc64p6 = "ppc64p6" PACKAGE_EXTRA_ARCHS:tune-ppc64p6 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc64} ppc64p6" # glibc configure options to get power6 specific library -GLIBC_EXTRA_OECONF:powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'power6', '--with-cpu=power6', '', d)}" -GLIBC_EXTRA_OECONF:powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'power6', '--with-cpu=power6', '', d)}" +GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'power6', ' --with-cpu=power6', '', d)}" # QEMU usermode fails with invalid instruction error MACHINE_FEATURES_BACKFILL_CONSIDERED:append = "${@bb.utils.contains('TUNE_FEATURES', 'power6', ' qemu-usermode', '', d)}"
meta/conf/machine/include/powerpc/tune-power7.inc +1 -2
@@ -17,8 +17,7 @@ TUNE_PKGARCH:tune-ppc64p7 = "ppc64p7" PACKAGE_EXTRA_ARCHS:tune-ppc64p7 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc64} ppc64p7" # glibc configure options to get power7 specific library -GLIBC_EXTRA_OECONF:powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'power7', '--with-cpu=power7', '', d)}" -GLIBC_EXTRA_OECONF:powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'power7', '--with-cpu=power7', '', d)}" +GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'power7', ' --with-cpu=power7', '', d)}" # QEMU usermode fails with invalid instruction error MACHINE_FEATURES_BACKFILL_CONSIDERED:append = "${@bb.utils.contains('TUNE_FEATURES', 'power7', ' qemu-usermode', '', d)}"
Signature · 1 line
2.53.0
PATCH v2 5/12 no-gplv3.inc: Convert confusing appends to override syntax
In reply to Michal SieronWhile in this case CORE_IMAGE_EXTRA_INSTALL::pn-* += wouldn't result in any unwanted override, there is no guarantee there won't be a change, which would be hidden by this override. To avoid any surprises in the future let's use :append:pn-* = syntax here.
--- meta/conf/distro/include/no-gplv3.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/distro/include/no-gplv3.inc +2 -2
@@ -18,9 +18,9 @@ PACKAGECONFIG:remove:pn-bluez5 = "readline" # dnf pulls in gpg which is gpl3; it also pulls in python3-rpm which pulls in rpm-build which pulls in bash # so install rpm but not dnf IMAGE_FEATURES:remove:pn-core-image-weston = "package-management" -CORE_IMAGE_EXTRA_INSTALL:pn-core-image-weston += "rpm" +CORE_IMAGE_EXTRA_INSTALL:append:pn-core-image-weston = " rpm" IMAGE_FEATURES:remove:pn-core-image-full-cmdline = "package-management" -CORE_IMAGE_EXTRA_INSTALL:pn-core-image-full-cmdline += "rpm" +CORE_IMAGE_EXTRA_INSTALL:append:pn-core-image-full-cmdline = " rpm" # matchbox-terminal depends on vte, which is gpl3 CORE_IMAGE_BASE_INSTALL:remove:pn-core-image-weston = "matchbox-terminal"
Signature · 1 line
2.53.0
Re: [OE-core] [PATCH v2 05/12] no-gplv3.inc: Convert confusing appends to override syntax
Quoted 21 lines · Michal Sieron via lists.openembedded.org
While in this case
CORE_IMAGE_EXTRA_INSTALL::pn-* +=wouldn't result in any unwanted override, there is no guarantee there won't be a change, which would be hidden by this override. To avoid any surprises in the future let's use:append:pn-* =syntax here.Signed-off-by Michal Sieron <[email protected]>--- meta/conf/distro/include/no-gplv3.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/conf/distro/include/no-gplv3.inc +0
-0@@ -18,9 +18,9 @@ PACKAGECONFIG:remove:pn-bluez5 = "readline" # dnf pulls in gpg which is gpl3; it also pulls in python3-rpm whichpulls in rpm-build which pulls in bash
# so install rpm but not dnf IMAGE_FEATURES:remove:pn-core-image-weston = "package-management"
meta/conf/distro/include/no-gplv3.inc PACKAGECONFIG:remove:pn-bluez5 = "readline" · line 23
Quoted 5 lines
meta/conf/distro/include/no-gplv3.inc +2
-2-CORE_IMAGE_EXTRA_INSTALL:pn-core-image-weston += "rpm" +CORE_IMAGE_EXTRA_INSTALL:append:pn-core-image-weston = " rpm" IMAGE_FEATURES:remove:pn-core-image-full-cmdline = "package-management" -CORE_IMAGE_EXTRA_INSTALL:pn-core-image-full-cmdline += "rpm" +CORE_IMAGE_EXTRA_INSTALL:append:pn-core-image-full-cmdline = " rpm"
while this patch is ok, I wonder if hardcoding rpm is the right thing here as it might be not right
for distros not using rpm backend e.g. ipk or deb backends instead.
Quoted 19 lines
# matchbox-terminal depends on vte, which is gpl3 CORE_IMAGE_BASE_INSTALL:remove:pn-core-image-weston = "matchbox-terminal"--
2.53.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#233278):
https://lists.openembedded.org/g/openembedded-core/message/233278
Mute This Topic: https://lists.openembedded.org/mt/118356437/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH v2 6/12 bootchart2: Convert confusing appends to override syntax
In reply to Michal SieronWhile in this case RDEPENDS:${PN}:class-target += wouldn't result in any unwanted override, there is no guarantee there won't be a change, which would be hidden by this override. To avoid any surprises in the future let's use :append:class-target = syntax here.
Also moving BBCLASSEXTEND to the bottom to conform to the style guide.
--- meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb +5 -5
@@ -106,9 +106,6 @@ ALTERNATIVE:${PN} = "bootchartd" ALTERNATIVE_LINK_NAME[bootchartd] = "${base_sbindir}/bootchartd" ALTERNATIVE_PRIORITY = "100" -# The only reason to build bootchart2-native is for a native pybootchartgui. -BBCLASSEXTEND = "native" - SYSTEMD_SERVICE:${PN} = "bootchart2.service bootchart2-done.service bootchart2-done.timer" UPDATERCPN = "bootchartd-stop-initscript"
@@ -150,8 +147,8 @@ do_install () { PACKAGES =+ "pybootchartgui" FILES:pybootchartgui += "${PYTHON_SITEPACKAGES_DIR}/pybootchartgui ${bindir}/pybootchartgui" RDEPENDS:pybootchartgui = "python3-pycairo python3-compression python3-image python3-math python3-shell python3-compression python3-codecs" -RDEPENDS:${PN}:class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}" -RDEPENDS:${PN}:class-target += "lsb-release" +RDEPENDS:${PN}:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}" +RDEPENDS:${PN}:append:class-target = " lsb-release" DEPENDS:append:class-native = " python3-pycairo-native" PACKAGES =+ "bootchartd-stop-initscript"
@@ -164,3 +161,6 @@ FILES:${PN} += "${libdir}" FILES:${PN}-doc += "${datadir}/docs" RCONFLICTS:${PN} = "bootchart" + +# The only reason to build bootchart2-native is for a native pybootchartgui. +BBCLASSEXTEND = "native"
Signature · 1 line
2.53.0
PATCH v2 7/12 pigz: Convert confusing append to override syntax
In reply to Michal SieronIn this case PROVIDES:class-native += doesn't override the default provide of ${PN} only because that one is :prepended and thus cannot be overriden. To avoid any surprises in the future let's use :append:class-native = syntax here.
--- meta/recipes-extended/pigz/pigz_2.8.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/pigz/pigz_2.8.bb +1 -1
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline SRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz" SRC_URI[sha256sum] = "eb872b4f0e1f0ebe59c9f7bd8c506c4204893ba6a8492de31df416f0d5170fd0" -PROVIDES:class-native += "gzip-native" +PROVIDES:append:class-native = " gzip-native" # Point this at the homepage in case /fossils/ isn't updated UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
Signature · 1 line
2.53.0
PATCH v2 8/12 systemtap: Convert confusing append to override syntax
In reply to Michal SieronWhile in this case RDEPENDS:${PN}:class-target += wouldn't result in any unwanted override, there is no guarantee there won't be a change, which would be hidden by this override. To avoid any surprises in the future let's use :append:class-target = syntax here.
--- meta/recipes-kernel/systemtap/systemtap_5.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/systemtap/systemtap_5.4.bb +1 -1
@@ -52,7 +52,7 @@ FILES:${PN}-runtime = "\ ${bindir}/stapsh \ ${libexecdir}/${BPN}/stapio \ " -RDEPENDS:${PN}:class-target += "${PN}-runtime" +RDEPENDS:${PN}:append:class-target = " ${PN}-runtime" PACKAGES =+ "${PN}-examples" FILES:${PN}-examples = "${datadir}/${BPN}/examples/"
Signature · 1 line
2.53.0
PATCH v2 9/12 ovmf: Convert confusing append to override syntax
In reply to Michal SieronThe only reason why this append wasn't overriding qemu-system-native entry from the line above is because that one was also defined with :class-target override. To avoid any surprises in the future let's use :append:class-target = syntax here.
--- meta/recipes-core/ovmf/ovmf_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/ovmf/ovmf_git.bb +1 -1
@@ -247,7 +247,7 @@ FILES:ovmf-shell-efi = " \ DEPLOYDEP = "" DEPLOYDEP:class-target = "qemu-system-native:do_populate_sysroot" -DEPLOYDEP:class-target += " ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'openssl-native:do_populate_sysroot', '', d)}" +DEPLOYDEP:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'openssl-native:do_populate_sysroot', '', d)}" do_deploy[depends] += "${DEPLOYDEP}" do_deploy() {
Signature · 1 line
2.53.0
PATCH v2 10/12 dnf: Convert confusing append to override syntax
In reply to Michal SieronWhile in this case RRECOMMENDS:${PN}:class-target += wouldn't result in any unwanted override, there is no guarantee there won't be a change, which would be hidden by this override. To avoid any surprises in the future let's use :append:class-target = syntax here.
--- meta/recipes-devtools/dnf/dnf_4.24.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/dnf/dnf_4.24.0.bb +1 -1
@@ -55,7 +55,7 @@ RDEPENDS:${PN} += " \ RDEPENDS:${PN}:class-native = "" -RRECOMMENDS:${PN}:class-target += "gnupg" +RRECOMMENDS:${PN}:append:class-target = " gnupg" # Create a symlink called 'dnf' as 'make install' does not do it, but # .spec file in dnf source tree does (and then Fedora and dnf documentation
Signature · 1 line
2.53.0
PATCH v2 11/12 qemu: Convert confusing append to override syntax
In reply to Michal SieronWhile in this case RDEPENDS:${PN}-common:class-target += wouldn't result in any unwanted override, there is no guarantee there won't be a change, which would be hidden by this override. To avoid any surprises in the future let's use :append:class-target = syntax here.
--- meta/recipes-devtools/qemu/qemu_10.2.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/qemu/qemu_10.2.0.bb +1 -1
@@ -9,7 +9,7 @@ DEPENDS:append:libc-musl = " libucontext" CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" LDFLAGS:append:toolchain-clang:x86 = " -latomic" -RDEPENDS:${PN}-common:class-target += "bash" +RDEPENDS:${PN}-common:append:class-target = " bash" EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
Signature · 1 line
2.53.0
PATCH v2 12/12 recipes-devtools/python: Convert confusing appends to override syntax
In reply to Michal SieronWhile in this case RDEPENDS:class-native += wouldn't result in any unwanted override, there is no guarantee there won't be a change, which would be hidden by this override. To avoid any surprises in the future let's use :append:class-target = syntax here.
--- meta/recipes-devtools/python/python3-asn1crypto_1.5.1.bb | 2 +- meta/recipes-devtools/python/python3-bcrypt_5.0.0.bb | 2 +- meta/recipes-devtools/python/python3-chardet_5.2.0.bb | 2 +- meta/recipes-devtools/python/python3-cython_3.2.4.bb | 4 ++-- meta/recipes-devtools/python/python3-ply_3.11.bb | 2 +- meta/recipes-devtools/python/python3-pyasn1_0.6.2.bb | 2 +- meta/recipes-devtools/python/python3-pycparser_3.0.bb | 4 ++-- meta/recipes-devtools/python/python3-pysocks_1.7.1.bb | 2 +- meta/recipes-devtools/python/python3-pytz_2025.2.bb | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-)
meta/recipes-devtools/python/python3-asn1crypto_1.5.1.bb +1 -1
@@ -10,7 +10,7 @@ SRC_URI[sha256sum] = "13ae38502be632115abf8a24cbe5f4da52e3b5231990aff31123c80530 inherit pypi setuptools3 -RDEPENDS:${PN}:class-target += " \ +RDEPENDS:${PN}:append:class-target = " \ python3-codecs \ python3-crypt \ python3-ctypes \
meta/recipes-devtools/python/python3-bcrypt_5.0.0.bb +1 -1
@@ -14,7 +14,7 @@ CARGO_SRC_DIR = "src/_bcrypt" require ${BPN}-crates.inc -RDEPENDS:${PN}:class-target += "\ +RDEPENDS:${PN}:append:class-target = " \ python3-cffi \ python3-ctypes \ python3-shell \
meta/recipes-devtools/python/python3-chardet_5.2.0.bb +1 -1
@@ -14,7 +14,7 @@ FILES:${PN}-cli += " \ RDEPENDS:${PN}-cli = "${PN} " -RDEPENDS:${PN}:class-target += " \ +RDEPENDS:${PN}:append:class-target = " \ python3-logging \ "
meta/recipes-devtools/python/python3-cython_3.2.4.bb +2 -2
@@ -25,7 +25,7 @@ do_install:append() { mv ${D}${bindir}/cygdb ${D}${bindir}/cygdb3 } -RDEPENDS:${PN}:class-target += "\ +RDEPENDS:${PN}:append:class-target = " \ python3-misc \ python3-netserver \ python3-pkgutil \
@@ -35,7 +35,7 @@ RDEPENDS:${PN}:class-target += "\ python3-xml \ " -RDEPENDS:${PN}:class-nativesdk += "\ +RDEPENDS:${PN}:append:class-nativesdk = " \ nativesdk-python3-misc \ nativesdk-python3-netserver \ nativesdk-python3-pkgutil \
meta/recipes-devtools/python/python3-ply_3.11.bb +1 -1
@@ -9,7 +9,7 @@ SRC_URI[sha256sum] = "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446 inherit pypi setuptools3 -RDEPENDS:${PN}:class-target += "\ +RDEPENDS:${PN}:append:class-target = " \ python3-netclient \ python3-shell \ "
meta/recipes-devtools/python/python3-pyasn1_0.6.2.bb +1 -1
@@ -7,7 +7,7 @@ SRC_URI[sha256sum] = "9b59a2b25ba7e4f8197db7686c09fb33e658b98339fadb826e95126290 inherit pypi python_setuptools_build_meta ptest-python-pytest -RDEPENDS:${PN}:class-target += " \ +RDEPENDS:${PN}:append:class-target = " \ python3-codecs \ python3-logging \ python3-math \
meta/recipes-devtools/python/python3-pycparser_3.0.bb +2 -2
@@ -9,11 +9,11 @@ inherit pypi python_setuptools_build_meta BBCLASSEXTEND = "native nativesdk" -RDEPENDS:${PN}:class-target += "\ +RDEPENDS:${PN}:append:class-target = " \ python3-netclient \ " -RSUGGESTS:${PN}:class-target += "\ +RSUGGESTS:${PN}:append:class-target = " \ cpp \ cpp-symlinks \ "
meta/recipes-devtools/python/python3-pysocks_1.7.1.bb +1 -1
@@ -9,7 +9,7 @@ PYPI_PACKAGE = "PySocks" inherit pypi setuptools3 -RDEPENDS:${PN}:class-target += "\ +RDEPENDS:${PN}:append:class-target = " \ python3-email \ python3-io \ python3-logging \
meta/recipes-devtools/python/python3-pytz_2025.2.bb +1 -1
@@ -9,7 +9,7 @@ PTEST_PYTEST_DIR = "pytz/tests" SRC_URI[sha256sum] = "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" -RDEPENDS:${PN}:class-target += "\ +RDEPENDS:${PN}:append:class-target = " \ python3-datetime \ python3-doctest \ python3-io \
Signature · 1 line
2.53.0
If you have scripted it then it would be great to see this run on meta-openembedded repository as well and see if there are some instances existing there too.
Quoted 147 lines · Michal Sieron via lists.openembedded.org
This patchset fixes several findings for variable assignments of form:
A:someoverride += "foo"and transforms them into:
A:append:someoverride = " foo"In most of those cases I assume the original intent was to have a conditional append, but what was actually happening was append to a conditional override.
I first noticed such problem in our internal recipes and bbappends, but then I decided to check if similar issue exists upstream and turns out it does.
In most places the override that was happening was harmless as there was no value that was being overriden, but that wasn't the case for libffi. Before patch:
$ grep EXTRA_OECONF /path/to/layers/openembedded-core/meta/recipes-support/libffi/ libffi_3.5.2.bb EXTRA_OECONF += "--disable-builddir --disable-exec-static-tramp" EXTRA_OECONF:class-native += "--with-gcc-arch=generic" $ bitbake-getvar -r libffi-native EXTRA_OECONF # # $EXTRA_OECONF [6 operations] # set /path/to/layers/openembedded-core/meta/conf/bitbake.conf:590 # "" # :append /path/to/layers/openembedded-core/meta/conf/distro/include/no-static-libs.inc:24 # "${DISABLE_STATIC}" # set /path/to/layers/openembedded-core/meta/conf/documentation.conf:164 # [doc] "Additional configure script options." # append /path/to/layers/openembedded-core/meta/recipes-support/libffi/ libffi_3.5.2.bb:18 # "--disable-builddir --disable-exec-static-tramp" # :append /path/to/layers/openembedded-core/meta/classes-recipe/autotools.bbclass:134 # " ${PACKAGECONFIG_CONFARGS}" # override[class-native]:append /path/to/layers/openembedded-core/meta/recipes-support/libffi/ libffi_3.5.2.bb:19 # "--with-gcc-arch=generic" # pre-expansion value: # " --with-gcc-arch=generic${DISABLE_STATIC} ${PACKAGECONFIG_CONFARGS}" EXTRA_OECONF=" --with-gcc-arch=generic --disable-static "After patch:
$ grep EXTRA_OECONF /path/to/layers/openembedded-core/meta/recipes-support/libffi/ libffi_3.5.2.bb EXTRA_OECONF += "--disable-builddir --disable-exec-static-tramp" EXTRA_OECONF:append:class-native = " --with-gcc-arch=generic" $ bitbake-getvar -r libffi-native EXTRA_OECONF# # $EXTRA_OECONF [6 operations] # set /path/to/layers/openembedded-core/meta/conf/bitbake.conf:590 # "" # :append /path/to/layers/openembedded-core/meta/conf/distro/include/no-static-libs.inc:24 # "${DISABLE_STATIC}" # set /path/to/layers/openembedded-core/meta/conf/documentation.conf:164 # [doc] "Additional configure script options." # append /path/to/layers/openembedded-core/meta/recipes-support/libffi/ libffi_3.5.2.bb:18 # "--disable-builddir --disable-exec-static-tramp" # :append[class-native] /path/to/layers/openembedded-core/meta/recipes-support/libffi/ libffi_3.5.2.bb:19 # " --with-gcc-arch=generic" # :append /path/to/layers/openembedded-core/meta/classes-recipe/autotools.bbclass:134 # " ${PACKAGECONFIG_CONFARGS}" # pre-expansion value: # " --disable-builddir --disable-exec-static-tramp${DISABLE_STATIC} --with-gcc-arch=generic ${PACKAGECONFIG_CONFARGS}" EXTRA_OECONF=" --disable-builddir --disable-exec-static-tramp --disable-static --with-gcc-arch=generic "---
Changes in v2:
- Split initial single commit into smaller ones
- Described actual impact on the overriden variables
- Added some recipes that I missed last time
- Link to v1:
https://lore.kernel.org/r/[email protected]---
Michal Sieron (12):
libffi: Fix invalid conditional append
coreutils: Convert confusing append to override syntax
expat: Convert confusing append to override syntax tune-power[567]: Remove confusing overrides
no-gplv3.inc: Convert confusing appends to override syntax
bootchart2: Convert confusing appends to override syntax
pigz: Convert confusing append to override syntax
systemtap: Convert confusing append to override syntax
ovmf: Convert confusing append to override syntax
dnf: Convert confusing append to override syntax
qemu: Convert confusing append to override syntax recipes-devtools/python: Convert confusing appends to override syntaxmeta/conf/distro/include/no-gplv3.inc | 4 ++-- meta/conf/machine/include/powerpc/tune-power5.inc | 3 +-- meta/conf/machine/include/powerpc/tune-power6.inc | 3 +-- meta/conf/machine/include/powerpc/tune-power7.inc | 3 +-- meta/recipes-core/coreutils/coreutils_9.10.bb | 4 ++-- meta/recipes-core/expat/expat_2.7.4.bb | 2 +- meta/recipes-core/ovmf/ovmf_git.bb | 2 +- meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb | 10 +++++----- meta/recipes-devtools/dnf/dnf_4.24.0.bb | 2 +- meta/recipes-devtools/python/python3-asn1crypto_1.5.1.bb | 2 +- meta/recipes-devtools/python/python3-bcrypt_5.0.0.bb | 2 +- meta/recipes-devtools/python/python3-chardet_5.2.0.bb | 2 +- meta/recipes-devtools/python/python3-cython_3.2.4.bb | 4 ++-- meta/recipes-devtools/python/python3-ply_3.11.bb | 2 +- meta/recipes-devtools/python/python3-pyasn1_0.6.2.bb | 2 +- meta/recipes-devtools/python/python3-pycparser_3.0.bb | 4 ++-- meta/recipes-devtools/python/python3-pysocks_1.7.1.bb | 2 +- meta/recipes-devtools/python/python3-pytz_2025.2.bb | 2 +- meta/recipes-devtools/qemu/qemu_10.2.0.bb | 2 +- meta/recipes-extended/pigz/pigz_2.8.bb | 2 +- meta/recipes-kernel/systemtap/systemtap_5.4.bb | 2 +- meta/recipes-support/libffi/libffi_3.5.2.bb | 2 +- 22 files changed, 30 insertions(+), 33 deletions(-)---
base-commit:f5e62a13cbe17947baa387c723422bc8ca766d34
change-id: 20260314-fix-invalid-appends-cf5197ef2f07Best regards,
--
Michal Sieron <[email protected]>-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#233273):
https://lists.openembedded.org/g/openembedded-core/message/233273
Mute This Topic: https://lists.openembedded.org/mt/118356432/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
I actually extended existing check in oelint-adv [1] and did run it on meta-openembedded already [2]. I first wanted to see what is the response from upstream and how those changes should look like. Once oe-core changes are merged and I find time, I will split and cleanup that commit for meta-oe.
[1]: https://github.com/priv-kweihmann/oelint-adv/pull/857
[2]: https://github.com/michalsieron/meta-openembedded/commit/cc5d9c473c337b9830d102c2e235e53f4a8a4b6a