]> code.ossystems Code Review - openembedded-core.git/commitdiff
cve-check: clean cve-check recipe result before re-building
authorPeter Marko <peter.marko@siemens.com>
Wed, 7 Jun 2017 06:04:30 +0000 (08:04 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 Jun 2017 14:04:08 +0000 (15:04 +0100)
If there is cve report for a recipe in previous build and there
is no result for current one, old cves are kept in CVE_CHECK_DIR.
This happens on version upgrade or when cve/recipe is whitelisted.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/cve-check.bbclass

index 3a9e22728888208bd6cb7db873d34d33fb447b86..09487f11741519d47c89bc5c8162f8861cbcf5e5 100644 (file)
@@ -83,6 +83,11 @@ python cve_check_write_rootfs_manifest () {
 
     import shutil
 
+    if d.getVar("CVE_CHECK_COPY_FILES") == "1":
+        deploy_file = os.path.join(d.getVar("CVE_CHECK_DIR"), d.getVar("PN"))
+        if os.path.exists(deploy_file):
+            bb.utils.remove(deploy_file)
+
     if os.path.exists(d.getVar("CVE_CHECK_TMP_FILE")):
         bb.note("Writing rootfs CVE manifest")
         deploy_dir = d.getVar("DEPLOY_DIR_IMAGE")