]> code.ossystems Code Review - openembedded-core.git/commitdiff
cve-update-db-native: don't hardcode the database name
authorRoss Burton <ross.burton@intel.com>
Mon, 18 Nov 2019 16:46:42 +0000 (16:46 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Nov 2019 23:06:08 +0000 (23:06 +0000)
Don't hardcode the database filename, there's a variable for this in
cve-check.bbclass.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/meta/cve-update-db-native.bb

index 19875a49b1c92296c8b52054df66bc74199c9f5c..c15534de08b825fefb32c71cef3cd4ae62fd4273 100644 (file)
@@ -28,8 +28,8 @@ python do_populate_cve_db() {
     BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-"
     YEAR_START = 2002
 
-    db_dir = os.path.join(d.getVar("DL_DIR"), 'CVE_CHECK')
-    db_file = os.path.join(db_dir, 'nvdcve_1.0.db')
+    db_file = d.getVar("CVE_CHECK_DB_FILE")
+    db_dir = os.path.dirname(db_file)
     json_tmpfile = os.path.join(db_dir, 'nvd.json.gz')
 
     # Don't refresh the database more than once an hour