From patchwork Tue Apr 7 16:10:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 85437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56832FF5104 for ; Tue, 7 Apr 2026 16:10:44 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.85135.1775578234847356502 for ; Tue, 07 Apr 2026 09:10:35 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=Nf4q5u42; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1CCA132D0 for ; Tue, 7 Apr 2026 09:10:28 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 86D7A3FC07 for ; Tue, 7 Apr 2026 09:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1775578233; bh=XhbDZxjgvOBskczfWUotQKnsKekGrScUaUkGCmf8kMs=; h=From:To:Subject:Date:From; b=Nf4q5u42yhuFVezPJ+iuaat8RRw/kXo3U5DnqyYFexkDzEJBTdBdSvMpWiEG+aBia oX3LjCHI4QW825MhYRSGqu44JWnXHTsSJ/v8K+RXEN5ymxgjV0b6Szx9z7lyvA9KZG PShBqzii4dIrNAz5TlZkdphkTr98WSFxQ0x+euF8= From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH] busybox: fix DISTRO_FEATURES detection Date: Tue, 7 Apr 2026 17:10:29 +0100 Message-ID: <20260407161030.1196116-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 07 Apr 2026 16:10:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234751 Changes to how DISTRO_FEATURES is evaluated meant that busybox was using a partial DISTRO_FEATURES and thus disabling features it should not be. This is due to the use of immediate assignments which are evaulated before the final value is calculated (by anonymous Python in base.bbclass). Remove entirely DO_IPv4/DO_IPv6 as they're used once, replacing with inline bb.utils.contains_any(). Remove the immediate assignments to OE_FEATURES/OE_DEL so that they are evaluated on use. The evaluation is expensive, but it only happens once. [1] oe-core 159148f4de ("meta: Support opting out of any distro features") Signed-off-by: Ross Burton --- meta/recipes-core/busybox/busybox.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 355c019738..1429da9f96 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -101,10 +101,8 @@ def features_to_busybox_del(d): configmangle = '/CONFIG_EXTRA_CFLAGS/d; \ ' -OE_FEATURES := "${@features_to_busybox_conf(d)}" -OE_DEL := "${@features_to_busybox_del(d)}" -DO_IPv4 := "${@bb.utils.contains('DISTRO_FEATURES', 'ipv4', 1, 0, d)}" -DO_IPv6 := "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 1, 0, d)}" +OE_FEATURES = "${@features_to_busybox_conf(d)}" +OE_DEL = "${@features_to_busybox_del(d)}" python () { if "${OE_DEL}": @@ -129,7 +127,8 @@ do_prepare_config () { for i in 'CROSS' 'DISTRO FEATURES'; do echo "### $i"; done >> \ ${S}/.config sed -i -e '${configmangle}' ${S}/.config - if test ${DO_IPv4} -eq 0 && test ${DO_IPv6} -eq 0; then + + if not ${@bb.utils.contains_any('DISTRO_FEATURES', 'ipv4 ipv6', 'true', 'false', d)}; then # disable networking applets mv ${S}/.config ${S}/.config.oe-tmp awk 'BEGIN{net=0}