summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2020-09-10 22:04:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-11 18:05:02 +0100
commitf5f97d33a1703d75b9fd9760f2c7767081538e00 (patch)
tree349a86e7187f62de9e2b97f3accaa1c8c223240d
parent9b230584664873af2ab453b8153b1ad276d3b0af (diff)
downloadopenembedded-core-contrib-f5f97d33a1703d75b9fd9760f2c7767081538e00.tar.gz
cve-update-db-native: use fetch task
Instead of inventing a new task to fetch the CVE data, use the existing fetch task. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/cve-check.bbclass2
-rw-r--r--meta/recipes-core/meta/cve-update-db-native.bb9
2 files changed, 6 insertions, 5 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 17f64a8a9c..02fef7c205 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -97,7 +97,7 @@ python do_cve_check () {
}
addtask cve_check before do_build after do_fetch
-do_cve_check[depends] = "cve-update-db-native:do_populate_cve_db"
+do_cve_check[depends] = "cve-update-db-native:do_fetch"
do_cve_check[nostamp] = "1"
python cve_check_cleanup () {
diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb
index 27b4c58d4e..e4e2451bfd 100644
--- a/meta/recipes-core/meta/cve-update-db-native.bb
+++ b/meta/recipes-core/meta/cve-update-db-native.bb
@@ -24,7 +24,7 @@ python () {
os.remove(cve_check_db_file)
}
-python do_populate_cve_db() {
+python do_fetch() {
"""
Update NVD database with json data feed
"""
@@ -114,7 +114,9 @@ python do_populate_cve_db() {
conn.close()
}
-do_populate_cve_db[lockfiles] += "${CVE_CHECK_DB_FILE_LOCK}"
+do_fetch[lockfiles] += "${CVE_CHECK_DB_FILE_LOCK}"
+do_fetch[file-checksums] = ""
+do_fetch[vardeps] = ""
def initialize_db(c):
c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)")
@@ -206,7 +208,6 @@ def update_db(c, jsondata):
parse_node_and_insert(c, config, cveId)
-addtask do_populate_cve_db before do_fetch
-do_populate_cve_db[nostamp] = "1"
+do_fetch[nostamp] = "1"
EXCLUDE_FROM_WORLD = "1"