]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cve-check: hook cleanup to the BuildCompleted event, not CookerExit
authorRoss Burton <ross.burton@arm.com>
Wed, 29 Jun 2022 15:15:19 +0000 (16:15 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 Jun 2022 09:26:48 +0000 (10:26 +0100)
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 <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/cve-check.bbclass

index 50b9247f46493f4986708e78b45665866a3e2ad5..da7f93371c0ec9a11530be6420acc11344cf8686 100644 (file)
@@ -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 () {
     """