From patchwork Tue Dec 1 10:02:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "P. Tatrai" X-Patchwork-Id: 106769 Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net [185.136.64.227]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.7762.1796119356299976083 for ; Tue, 01 Dec 2026 02:02:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=peter.tatrai.ext@siemens.com header.s=fm1 header.b=cuVHQrwm; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.64.227, mailfrom: fm-1328017-20261201100233bb8b88c58e000207fc-a2vnsy@rts-flowmailer.siemens.com) Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 20261201100233bb8b88c58e000207fc for ; Tue, 01 Dec 2026 11:02:33 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=peter.tatrai.ext@siemens.com; h=from:from:sender:to:to:cc:subject:subject:content-type:content-transfer-encoding:content-transfer-encoding:References:In-Reply-To:Date:Message-ID:MIME-Version; bh=8r6yx58bH9YuHMoiKQoZiJxHimEDG0+9yO9lUPodVBU=; b=cuVHQrwmzb9k5yQ8utXPrLraSDJ+0vpt6P4X9cdOALrBeNWynxD+toxGgHwsbK+8iNZBje wTUqJO+zIWPPEdJvWu0hUr6MELIfoOse2Ub6K2FNhy+lwnNl1zjuQM887t7uW9PNw1DN9/IW mqAoKndRsehST/Lv70AYpvCPELJ4xJZ3uFWnPond9DAYsH1le0jnlECQfGW+0cXTLYK8lfxw col4PqbtMFQn5HH+g4F+BSWjvly7O6daIy5bPyFPUcqizc4EVudT3tV5piuE+7U59KE6nh/3 W0ATreegSdtQGPmMNWA9b8bLjcxODbYctOQ1P9GfEgXtgL03PVaYKsDg==; From: "P. Tatrai" To: openembedded-core@lists.openembedded.org Subject: [scarthgap][PATCH v2 5/8] cve-check: Fix errors in log lines Date: Tue, 1 Dec 2026 11:02:28 +0100 Message-Id: <20261201100231.3119168-6-peter.tatrai.ext@siemens.com> In-Reply-To: <20261201100231.3119168-1-peter.tatrai.ext@siemens.com> References: <20261201100231.3119168-1-peter.tatrai.ext@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1328017:519-21489:flowmailer List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 10:02:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251701 From: Colin McAllister Two warning lines in cve_check.py reference a variable that doesn't exist. These would cause a runtime error if the conditions they are hidden in were to be entered. The log lines have been updated to no longer reference an undefined variable. Signed-off-by: Colin McAllister Signed-off-by: Richard Purdie (cherry picked from commit c9d059e8a362b3c9d604f7ebe8fd1dd994f0af6b) Signed-off-by: Peter Tatrai --- meta/lib/oe/cve_check.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/meta/lib/oe/cve_check.py b/meta/lib/oe/cve_check.py index af7745c..decc4b4 100644 --- a/meta/lib/oe/cve_check.py +++ b/meta/lib/oe/cve_check.py @@ -247,7 +247,10 @@ def decode_cve_status_scoped(d, cve): description = status_split[4].strip() elif len(status_split) >= 2 and status_split[1].strip() == "cpe": # Malformed CPE - bb.warn('Invalid CPE information for CVE_STATUS[%s] = "%s", not setting CPE' % (detail, cve, status)) + bb.warn( + 'Invalid CPE information for CVE_STATUS[%s] = "%s", not setting CPE' + % (cve, status) + ) else: # Other case: no CPE, the syntax is then: # detail: description @@ -257,9 +260,13 @@ def decode_cve_status_scoped(d, cve): status_out["product"] = product status_out["description"] = description - status_mapping = d.getVarFlag("CVE_CHECK_STATUSMAP", status_out['detail']) + detail = status_out["detail"] + status_mapping = d.getVarFlag("CVE_CHECK_STATUSMAP", detail) if status_mapping is None: - bb.warn('Invalid detail "%s" for CVE_STATUS[%s] = "%s", fallback to Unpatched' % (detail, cve, status)) + bb.warn( + 'Invalid detail "%s" for CVE_STATUS[%s] = "%s", fallback to Unpatched' + % (detail, cve, status) + ) status_mapping = "Unpatched" status_out["mapping"] = status_mapping