summaryrefslogtreecommitdiffstats
path: root/meta/classes/vex.bbclass
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-04-17 11:34:56 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-04-24 11:27:06 +0100
commit9fd08fcd9450e89be8877d348658d3eeb4f9bf05 (patch)
tree194fc44f1ed723839a35d3196769910414b6d81f /meta/classes/vex.bbclass
parentf68e3e49d4f55e7c451450ffa3e33eb111ec5249 (diff)
downloadpoky-9fd08fcd9450e89be8877d348658d3eeb4f9bf05.tar.gz
cve-check: extract extending CVE_STATUS to library function
The same code for extending CVE_STATUS by CVE_CHECK_IGNORE and CVE_STATUS_GROUPS is used on multiple places. Create a library funtion to have the code on single place and ready for reuse by additional classes. (From OE-Core rev: 45e18f4270d084d81c21b1e5a4a601ce975d8a77) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/vex.bbclass')
-rw-r--r--meta/classes/vex.bbclass17
1 files changed, 2 insertions, 15 deletions
diff --git a/meta/classes/vex.bbclass b/meta/classes/vex.bbclass
index 01d4e52051..905d67b47d 100644
--- a/meta/classes/vex.bbclass
+++ b/meta/classes/vex.bbclass
@@ -76,21 +76,8 @@ python () {
76 if bb.data.inherits_class("cve-check", d): 76 if bb.data.inherits_class("cve-check", d):
77 raise bb.parse.SkipRecipe("Skipping recipe: found incompatible combination of cve-check and vex enabled at the same time.") 77 raise bb.parse.SkipRecipe("Skipping recipe: found incompatible combination of cve-check and vex enabled at the same time.")
78 78
79 # Fallback all CVEs from CVE_CHECK_IGNORE to CVE_STATUS 79 from oe.cve_check import extend_cve_status
80 cve_check_ignore = d.getVar("CVE_CHECK_IGNORE") 80 extend_cve_status(d)
81 if cve_check_ignore:
82 bb.warn("CVE_CHECK_IGNORE is deprecated in favor of CVE_STATUS")
83 for cve in (d.getVar("CVE_CHECK_IGNORE") or "").split():
84 d.setVarFlag("CVE_STATUS", cve, "ignored")
85
86 # Process CVE_STATUS_GROUPS to set multiple statuses and optional detail or description at once
87 for cve_status_group in (d.getVar("CVE_STATUS_GROUPS") or "").split():
88 cve_group = d.getVar(cve_status_group)
89 if cve_group is not None:
90 for cve in cve_group.split():
91 d.setVarFlag("CVE_STATUS", cve, d.getVarFlag(cve_status_group, "status"))
92 else:
93 bb.warn("CVE_STATUS_GROUPS contains undefined variable %s" % cve_status_group)
94} 81}
95 82
96def generate_json_report(d, out_path, link_path): 83def generate_json_report(d, out_path, link_path):