summaryrefslogtreecommitdiffstats
path: root/meta/classes/cve-check.bbclass
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2017-06-07 08:04:30 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-12 15:08:30 +0100
commit1a146e58854c0998b840945c18c9bfc1e8bd1f42 (patch)
treed541db118a135ed627e6322ae68cf8df33543ee8 /meta/classes/cve-check.bbclass
parent5a9cc41a3bbe3f955bf570d99f6474aa44b23d25 (diff)
downloadpoky-1a146e58854c0998b840945c18c9bfc1e8bd1f42.tar.gz
cve-check: clean cve-check recipe result before re-building
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. (From OE-Core rev: 85b4941c71a0e3c08a8c48d52a94dfe2897d2c92) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/cve-check.bbclass')
-rw-r--r--meta/classes/cve-check.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 3a9e227288..09487f1174 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -83,6 +83,11 @@ python cve_check_write_rootfs_manifest () {
83 83
84 import shutil 84 import shutil
85 85
86 if d.getVar("CVE_CHECK_COPY_FILES") == "1":
87 deploy_file = os.path.join(d.getVar("CVE_CHECK_DIR"), d.getVar("PN"))
88 if os.path.exists(deploy_file):
89 bb.utils.remove(deploy_file)
90
86 if os.path.exists(d.getVar("CVE_CHECK_TMP_FILE")): 91 if os.path.exists(d.getVar("CVE_CHECK_TMP_FILE")):
87 bb.note("Writing rootfs CVE manifest") 92 bb.note("Writing rootfs CVE manifest")
88 deploy_dir = d.getVar("DEPLOY_DIR_IMAGE") 93 deploy_dir = d.getVar("DEPLOY_DIR_IMAGE")