From: Ross Burton Date: Wed, 29 Jun 2022 15:15:19 +0000 (+0100) Subject: cve-check: hook cleanup to the BuildCompleted event, not CookerExit X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~3753 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fccdcfd301de281a427bfee48d8ff47fa07b7259;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index 50b9247f464..da7f93371c0 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass @@ -166,7 +166,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 () { """