mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
cve-update-db-native: use fetch task
Instead of inventing a new task to fetch the CVE data, use the existing fetch task. (From OE-Core rev: f5f97d33a1703d75b9fd9760f2c7767081538e00) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f0d9c8926b
commit
33efd93517
@@ -97,7 +97,7 @@ python do_cve_check () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addtask cve_check before do_build after do_fetch
|
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"
|
do_cve_check[nostamp] = "1"
|
||||||
|
|
||||||
python cve_check_cleanup () {
|
python cve_check_cleanup () {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ python () {
|
|||||||
os.remove(cve_check_db_file)
|
os.remove(cve_check_db_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
python do_populate_cve_db() {
|
python do_fetch() {
|
||||||
"""
|
"""
|
||||||
Update NVD database with json data feed
|
Update NVD database with json data feed
|
||||||
"""
|
"""
|
||||||
@@ -114,7 +114,9 @@ python do_populate_cve_db() {
|
|||||||
conn.close()
|
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):
|
def initialize_db(c):
|
||||||
c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)")
|
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)
|
parse_node_and_insert(c, config, cveId)
|
||||||
|
|
||||||
|
|
||||||
addtask do_populate_cve_db before do_fetch
|
do_fetch[nostamp] = "1"
|
||||||
do_populate_cve_db[nostamp] = "1"
|
|
||||||
|
|
||||||
EXCLUDE_FROM_WORLD = "1"
|
EXCLUDE_FROM_WORLD = "1"
|
||||||
|
|||||||
Reference in New Issue
Block a user