summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/meta/cve-update-db-native.bb8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb
index fe7b8a017f..8a3746a9c1 100644
--- a/meta/recipes-core/meta/cve-update-db-native.bb
+++ b/meta/recipes-core/meta/cve-update-db-native.bb
@@ -58,7 +58,7 @@ python do_fetch() {
58 bb.error("CVE database %s not present, database fetch/update skipped" % db_file) 58 bb.error("CVE database %s not present, database fetch/update skipped" % db_file)
59 return 59 return
60 if time.time() - os.path.getmtime(db_file) < update_interval: 60 if time.time() - os.path.getmtime(db_file) < update_interval:
61 bb.debug(2, "Recently updated, skipping") 61 bb.note("CVE database recently updated, skipping")
62 return 62 return
63 63
64 except OSError: 64 except OSError:
@@ -77,7 +77,7 @@ python do_fetch() {
77 shutil.move(db_tmp_file, db_file) 77 shutil.move(db_tmp_file, db_file)
78 else: 78 else:
79 # Update failed, do not modify the database 79 # Update failed, do not modify the database
80 bb.note("CVE database update failed") 80 bb.warn("CVE database update failed")
81 os.remove(db_tmp_file) 81 os.remove(db_tmp_file)
82} 82}
83 83
@@ -159,7 +159,7 @@ def update_db_file(db_tmp_file, d):
159 with bb.progress.ProgressHandler(d) as ph, open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') as cve_f: 159 with bb.progress.ProgressHandler(d) as ph, open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') as cve_f:
160 total_years = date.today().year + 1 - YEAR_START 160 total_years = date.today().year + 1 - YEAR_START
161 for i, year in enumerate(range(YEAR_START, date.today().year + 1)): 161 for i, year in enumerate(range(YEAR_START, date.today().year + 1)):
162 bb.debug(2, "Updating %d" % year) 162 bb.note("Updating %d" % year)
163 ph.update((float(i + 1) / total_years) * 100) 163 ph.update((float(i + 1) / total_years) * 100)
164 json_url, meta_url = db_file_names(d, year, is_nvd) 164 json_url, meta_url = db_file_names(d, year, is_nvd)
165 165
@@ -190,7 +190,7 @@ def update_db_file(db_tmp_file, d):
190 cursor.close() 190 cursor.close()
191 191
192 if not meta or meta[0] != last_modified: 192 if not meta or meta[0] != last_modified:
193 bb.debug(2, "Updating entries") 193 bb.note("Updating entries")
194 # Clear products table entries corresponding to current year 194 # Clear products table entries corresponding to current year
195 conn.execute("delete from PRODUCTS where ID like ?", ('CVE-%d%%' % year,)).close() 195 conn.execute("delete from PRODUCTS where ID like ?", ('CVE-%d%%' % year,)).close()
196 196