From 1c38d0d3d66fa8f04b0a4cde11decc5873573ea6 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 29 Jun 2022 16:15:19 +0100 Subject: [PATCH] cve-check: hook cleanup to the BuildCompleted event, not CookerExit The cve-check class writes temporary files to preserve state across the build, and cleans them up in a CookerExit handler. However, in memory-resident builds the cooker won't exit in between builds, so the state isn't cleared and the CVE report generation fails: NOTE: Generating JSON CVE summary ERROR: Error adding the same package twice Easily solved by hooking to BuildCompleted, instead of CookerExit. (From OE-Core rev: ee3270709158aff463fec6798f3b8968268b4d4b) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie (cherry picked from commit fccdcfd301de281a427bfee48d8ff47fa07b7259) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- meta/classes/cve-check.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index d0f6970db8..1688fe2dfe 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass @@ -164,7 +164,7 @@ python cve_check_cleanup () { } addhandler cve_check_cleanup -cve_check_cleanup[eventmask] = "bb.cooker.CookerExit" +cve_check_cleanup[eventmask] = "bb.event.BuildCompleted" python cve_check_write_rootfs_manifest () { """