From patchwork Mon Jul 28 09:59:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Lorenz X-Patchwork-Id: 67553 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 94C1FC87FD3 for ; Mon, 28 Jul 2025 10:07:26 +0000 (UTC) Received: from esa9.hc324-48.eu.iphmx.com (esa9.hc324-48.eu.iphmx.com [207.54.69.27]) by mx.groups.io with SMTP id smtpd.web11.78165.1753697237256644382 for ; Mon, 28 Jul 2025 03:07:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bmw.de header.s=mailing1 header.b=c3366G78; spf=pass (domain: bmw.de, ip: 207.54.69.27, mailfrom: prvs=2978930ce=philip.lorenz@bmw.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bmw.de; i=@bmw.de; q=dns/txt; s=mailing1; t=1753697238; x=1785233238; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZwXgxJHbw+R47QuZLrxeDC5jv7OhxJ7R1mdVOpL3gJI=; b=c3366G78IVzyf3zzFTu3kqQRIHiiwdbD38KcEzNLp/78QWqw2nZ/uWEW /Ssz0qPKEZcElAJcdL/O8Auzs7baVRAwISyFT+DLpMUkiyMxCmNGWwpoE owFQ4Z2aKjLqnXqvEYaIkuvPofslJyn6MoYQLTER7EpdJWlz3R7ozscvo 4=; X-CSE-ConnectionGUID: y3+/7qz0TvyGoU46bgUsFg== X-CSE-MsgGUID: Q7oZOqPUQ/uKqQ352HeXMQ== Received: from 160.46.252.35.spf.bmwgroup.com.bmwgroup.com (HELO esagw3.muc) ([160.46.252.35]) by esa9.hc324-48.eu.iphmx.com with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from esabb1.muc ([160.50.100.31]) by esagw3.muc with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from smucmp19d.bmwgroup.net (HELO smucmp19d.europe.bmw.corp) ([10.30.13.170]) by esabb1.muc with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from marvin-ws (10.30.85.214) by smucmp19d.europe.bmw.corp (2a03:1e80:a15:58f::205d) with Microsoft SMTP Server (version=TLS; Mon, 28 Jul 2025 12:07:14 +0200 X-CSE-ConnectionGUID: WKZ/aaUlRAKRVr0kTr86PA== X-CSE-MsgGUID: 2xwAJkNZRXK7eR1UpyjzBw== X-CSE-ConnectionGUID: 2F3nJYecSMS47dQVho/OlQ== X-CSE-MsgGUID: OQMUcoJ6QF+dFNwILpV9RA== From: Philip Lorenz To: CC: Philip Lorenz Subject: [PATCH 1/4] package: Drop var-undefined QA check Date: Mon, 28 Jul 2025 11:59:29 +0200 Message-ID: <20250728095936.1495441-2-philip.lorenz@bmw.de> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250728095936.1495441-1-philip.lorenz@bmw.de> References: <20250728095936.1495441-1-philip.lorenz@bmw.de> MIME-Version: 1.0 X-ClientProxiedBy: SMUCMP12F.europe.bmw.corp (2a03:1e80:a15:58f::1:2b0) To smucmp19d.europe.bmw.corp (2a03:1e80:a15:58f::205d) List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 28 Jul 2025 10:07:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220997 The variables checked for are mandatory in all cases so a QA check does not seem to be the right choice for this. Additionally, the code never called `exit_if_errors` so the reported QA issue didn't actually fail the task. Signed-off-by: Philip Lorenz --- meta/classes-global/insane.bbclass | 2 +- meta/classes-global/package.bbclass | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index 4ef664b3cee..fed8163c3e0 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -35,7 +35,7 @@ CHECKLAYER_REQUIRED_TESTS = "\ packages-list patch-fuzz patch-status perllocalpod perm-config perm-line perm-link recipe-naming \ pkgconfig pkgvarcheck pkgv-undefined pn-overrides shebang-size src-uri-bad symlink-to-sysroot \ unhandled-features-check unknown-configure-option unlisted-pkg-lics uppercase-pn useless-rpaths \ - var-undefined virtual-slash xorg-driver-abi" + virtual-slash xorg-driver-abi" # Elect whether a given type of error is a warning or error, they may # have been set by other files. diff --git a/meta/classes-global/package.bbclass b/meta/classes-global/package.bbclass index 9be1d6a5b17..d7ff333f202 100644 --- a/meta/classes-global/package.bbclass +++ b/meta/classes-global/package.bbclass @@ -494,8 +494,7 @@ python do_package () { pn = d.getVar('PN') if not workdir or not outdir or not dest or not dvar or not pn: - msg = "WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package" - oe.qa.handle_error("var-undefined", msg, d) + bb.fatal("WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package") return bb.build.exec_func("package_setup_pkgv", d) From patchwork Mon Jul 28 09:59:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Lorenz X-Patchwork-Id: 67554 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 94A5AC87FCE for ; Mon, 28 Jul 2025 10:07:26 +0000 (UTC) Received: from esa5.hc324-48.eu.iphmx.com (esa5.hc324-48.eu.iphmx.com [207.54.71.60]) by mx.groups.io with SMTP id smtpd.web10.77810.1753697238020690729 for ; Mon, 28 Jul 2025 03:07:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bmw.de header.s=mailing1 header.b=e8OO40zQ; spf=pass (domain: bmw.de, ip: 207.54.71.60, mailfrom: prvs=2978930ce=philip.lorenz@bmw.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bmw.de; i=@bmw.de; q=dns/txt; s=mailing1; t=1753697237; x=1785233237; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=U/FzDjhzJFaGctE0hx1eOrCcqgFI7DjnRFSuoyb+MyI=; b=e8OO40zQRc3tQfWZZ0Jmq0pFLh5cz2r75cMGOIaQiqhNkIFJ0tWDxZtc IeAXtb6LAOfel7wKnW/1KnT/wwj/NNiYGXzP2WIIxUGQO0QFwKaLldf0Y AkD7D3jYr5QHLUPqyngyBYDxNTuqgOXupZplRtOgUHYhBUoJ9VRtCxDS3 4=; X-CSE-ConnectionGUID: oRwh75rmTx2Ys2PQPcBpQw== X-CSE-MsgGUID: LxoMvCpdRk2ieI1UVCIgIA== Received: from esagw1.bmwgroup.com (HELO esagw1.muc) ([160.46.252.34]) by esa5.hc324-48.eu.iphmx.com with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from unknown (HELO esabb3.muc) ([10.31.187.134]) by esagw1.muc with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from smucmp19d.bmwgroup.net (HELO smucmp19d.europe.bmw.corp) ([10.30.13.170]) by esabb3.muc with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from marvin-ws (10.30.85.214) by smucmp19d.europe.bmw.corp (2a03:1e80:a15:58f::205d) with Microsoft SMTP Server (version=TLS; Mon, 28 Jul 2025 12:07:14 +0200 X-CSE-ConnectionGUID: 38ych5vvRsihH6KfpZsexg== X-CSE-MsgGUID: EIifXF9hR3GveVw7af6vdQ== X-CSE-ConnectionGUID: mZZ4DipqTp2MuryUDEYO0A== X-CSE-MsgGUID: QjbwjX9wQAKHPSUagNVjOg== From: Philip Lorenz To: CC: Philip Lorenz Subject: [PATCH 2/4] setuptools3: Add missing call to exit_if_errors Date: Mon, 28 Jul 2025 11:59:30 +0200 Message-ID: <20250728095936.1495441-3-philip.lorenz@bmw.de> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250728095936.1495441-1-philip.lorenz@bmw.de> References: <20250728095936.1495441-1-philip.lorenz@bmw.de> MIME-Version: 1.0 X-ClientProxiedBy: SMUCMP12F.europe.bmw.corp (2a03:1e80:a15:58f::1:2b0) To smucmp19d.europe.bmw.corp (2a03:1e80:a15:58f::205d) List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 28 Jul 2025 10:07:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220996 `exit_if_errors` must be called explicitly at the end of the task execution to ensure that QA issues categorized as errors fail the task. Signed-off-by: Philip Lorenz --- meta/classes-recipe/setuptools3.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/classes-recipe/setuptools3.bbclass b/meta/classes-recipe/setuptools3.bbclass index 0adce5e2ece..c2f4b0287c7 100644 --- a/meta/classes-recipe/setuptools3.bbclass +++ b/meta/classes-recipe/setuptools3.bbclass @@ -23,6 +23,7 @@ python do_check_backend() { msg = f"inherits setuptools3 but has pyproject.toml with {match[1]}, use the correct class" if "pep517-backend" not in (d.getVar("INSANE_SKIP") or "").split(): oe.qa.handle_error("pep517-backend", msg, d) + oe.qa.exit_if_errors(d) } addtask check_backend after do_patch before do_configure From patchwork Mon Jul 28 09:59:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Lorenz X-Patchwork-Id: 67552 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 7A346C87FC9 for ; Mon, 28 Jul 2025 10:07:26 +0000 (UTC) Received: from esa9.hc324-48.eu.iphmx.com (esa9.hc324-48.eu.iphmx.com [207.54.69.27]) by mx.groups.io with SMTP id smtpd.web11.78165.1753697237256644382 for ; Mon, 28 Jul 2025 03:07:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bmw.de header.s=mailing1 header.b=NS8ZIoIn; spf=pass (domain: bmw.de, ip: 207.54.69.27, mailfrom: prvs=2978930ce=philip.lorenz@bmw.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bmw.de; i=@bmw.de; q=dns/txt; s=mailing1; t=1753697239; x=1785233239; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nRjSGmUCcraL9tkRJgV15cStrmiW7C38c3FrUq3vdBM=; b=NS8ZIoInx16DMeyEFvwkjhWzai3K6wBJ4WYgqFgdGBFAhUeFCwahPTF1 pkpBz7FFFPBzLJJTYYazox4b6oYfogDuIrZJqhIFnnHPiH5zjqXkGnSXm Kk4iV5O10s4iy1El12iRPGvr5E4ejq04xU8rxfq1v6jx8fDe9HG9+Y1pt Q=; X-CSE-ConnectionGUID: y3+/7qz0TvyGoU46bgUsFg== X-CSE-MsgGUID: 4fZU5XeHRNSWUHLm5RPcnw== Received: from 160.46.252.35.spf.bmwgroup.com.bmwgroup.com (HELO esagw3.muc) ([160.46.252.35]) by esa9.hc324-48.eu.iphmx.com with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from esabb1.muc ([160.50.100.31]) by esagw3.muc with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from smucmp19d.bmwgroup.net (HELO smucmp19d.europe.bmw.corp) ([10.30.13.170]) by esabb1.muc with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from marvin-ws (10.30.85.214) by smucmp19d.europe.bmw.corp (2a03:1e80:a15:58f::205d) with Microsoft SMTP Server (version=TLS; Mon, 28 Jul 2025 12:07:15 +0200 X-CSE-ConnectionGUID: aufQisU5Tti3JiFCQpFqXg== X-CSE-MsgGUID: nTLqxeFuTESVJQUTTgioXw== X-CSE-ConnectionGUID: mii+d8KkTQSI1DPUmrGljA== X-CSE-MsgGUID: fMBpOETPQDSHEV6XCYZXaA== From: Philip Lorenz To: CC: Philip Lorenz Subject: [PATCH 3/4] insane: Explicitly fail parsing if QA errors were raised Date: Mon, 28 Jul 2025 11:59:31 +0200 Message-ID: <20250728095936.1495441-4-philip.lorenz@bmw.de> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250728095936.1495441-1-philip.lorenz@bmw.de> References: <20250728095936.1495441-1-philip.lorenz@bmw.de> MIME-Version: 1.0 X-ClientProxiedBy: SMUCMP12F.europe.bmw.corp (2a03:1e80:a15:58f::1:2b0) To smucmp19d.europe.bmw.corp (2a03:1e80:a15:58f::205d) List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 28 Jul 2025 10:07:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220999 So far, failing the build when a QA error was raised happened implicitly when another (unrelated) caller called `exit_if_errors` (e.g. insane.bbclass's anonymous Python function). This is error prone and may also lead to inconsistent abortion behaviour when parsing QA errors are only raised later. Fix this by introducing an explicit call to `exit_if_errors` once recipe parsing has finished. Currently code in the following .bbclasses relies on insane.bbclass to call `exit_if_errors`: * license.bbclass * yocto-check-layer.bbclass Signed-off-by: Philip Lorenz --- meta/classes-global/base.bbclass | 4 ++++ meta/classes-global/insane.bbclass | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index 6be1f5c2df2..6fe37755ffa 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass @@ -348,6 +348,10 @@ python base_eventhandler() { profprov = d.getVar("PREFERRED_PROVIDER_" + p) if profprov and pn != profprov: raise bb.parse.SkipRecipe("PREFERRED_PROVIDER_%s set to %s, not %s" % (p, profprov, pn)) + + # Bail out early if parsing raised any QA errors + oe.qa.exit_if_errors(d) + } CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate" diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index fed8163c3e0..f0b7f83e51d 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -1627,6 +1627,4 @@ python () { if broken_order: oe.qa.handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. " "Classes inherited after native/nativesdk: %s" % (pn, " ".join(broken_order)), d) - - oe.qa.exit_if_errors(d) } From patchwork Mon Jul 28 09:59:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Lorenz X-Patchwork-Id: 67555 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 8762DC83F17 for ; Mon, 28 Jul 2025 10:07:26 +0000 (UTC) Received: from esa5.hc324-48.eu.iphmx.com (esa5.hc324-48.eu.iphmx.com [207.54.71.60]) by mx.groups.io with SMTP id smtpd.web10.77810.1753697238020690729 for ; Mon, 28 Jul 2025 03:07:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bmw.de header.s=mailing1 header.b=GFPbica6; spf=pass (domain: bmw.de, ip: 207.54.71.60, mailfrom: prvs=2978930ce=philip.lorenz@bmw.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bmw.de; i=@bmw.de; q=dns/txt; s=mailing1; t=1753697239; x=1785233239; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uJdH52lttGnDWD1Au/5GFaoFDUxI6mV6dZsYeEFtWuw=; b=GFPbica64H0mo1poXsGAdKTs6+zKzXnGWkO4Oq3Kr0o1o9WevUzMOopz 64V1eKJkQ46tW1FN0a6Inh8/HcstGxJ7xoUdG/lV+i6yQr6ylkWp+C5WD TdIgrhfaWWoA3x9IPOYozEYtKwrw+v+X2IuF+SxGfJF33NIedKdisrx8l U=; X-CSE-ConnectionGUID: p+Fg/nFQRUekYoc1Z5+YWg== X-CSE-MsgGUID: V2PICnMjS+ahst5rTK6NuQ== Received: from 160.46.252.38.spf.bmwgroup.com (HELO esagw2.muc) ([160.46.252.38]) by esa5.hc324-48.eu.iphmx.com with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from unknown (HELO esabb5.muc) ([10.31.187.136]) by esagw2.muc with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from smucmp19d.bmwgroup.net (HELO smucmp19d.europe.bmw.corp) ([10.30.13.170]) by esabb5.muc with ESMTP/TLS; 28 Jul 2025 12:07:15 +0200 Received: from marvin-ws (10.30.85.214) by smucmp19d.europe.bmw.corp (2a03:1e80:a15:58f::205d) with Microsoft SMTP Server (version=TLS; Mon, 28 Jul 2025 12:07:15 +0200 X-CSE-ConnectionGUID: jia+/5ouRXubAH8cykFIiQ== X-CSE-MsgGUID: Py9J66j3QOybuFgMhctZeg== X-CSE-ConnectionGUID: EYPucLiQSNCF6dICC9yv4A== X-CSE-MsgGUID: +A6Wtir3TLiQdJMm9ecv5Q== From: Philip Lorenz To: CC: Philip Lorenz Subject: [PATCH 4/4] license_image: Make use of exit_if_errors consistent Date: Mon, 28 Jul 2025 11:59:32 +0200 Message-ID: <20250728095936.1495441-5-philip.lorenz@bmw.de> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250728095936.1495441-1-philip.lorenz@bmw.de> References: <20250728095936.1495441-1-philip.lorenz@bmw.de> MIME-Version: 1.0 X-ClientProxiedBy: SMUCMP12F.europe.bmw.corp (2a03:1e80:a15:58f::1:2b0) To smucmp19d.europe.bmw.corp (2a03:1e80:a15:58f::205d) List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 28 Jul 2025 10:07:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220998 `exit_if_errors` is typically called at the end of the outermost call site (e.g. the task or hook calling a function which raises QA issues). Adapt license_image accordingly. Signed-off-by: Philip Lorenz --- meta/classes-recipe/license_image.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/classes-recipe/license_image.bbclass b/meta/classes-recipe/license_image.bbclass index d2c5ab902ce..0d8cd7ab911 100644 --- a/meta/classes-recipe/license_image.bbclass +++ b/meta/classes-recipe/license_image.bbclass @@ -51,6 +51,8 @@ python license_create_manifest() { rootfs_license_manifest = os.path.join(d.getVar('LICENSE_DIRECTORY'), d.getVar('SSTATE_PKGARCH'), d.getVar('IMAGE_NAME'), 'license.manifest') write_license_files(d, rootfs_license_manifest, pkg_dic, rootfs=True) + + oe.qa.exit_if_errors(d) } def write_license_files(d, license_manifest, pkg_dic, rootfs=True): @@ -116,7 +118,6 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True): "The license listed %s was not in the "\ "licenses collected for recipe %s" % (lic, pkg_dic[pkg]["PN"]), d) - oe.qa.exit_if_errors(d) # Two options here: # - Just copy the manifest