summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-08-24 16:57:41 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-08-28 10:47:08 +0100
commit0844840c7d8e9e8ecf7c87662cb1ff8941b79c4f (patch)
treeeffa2b20f4c27de515e55c2d4cbba13fa90ec57a
parent42b14b33d0a2354de6efe0b60328886bb353ded0 (diff)
downloadpoky-0844840c7d8e9e8ecf7c87662cb1ff8941b79c4f.tar.gz
cve-update-db-native: log a little more
OE-Core rev: b64a869b9c5e1d504f1011da16b5c5ff721afbf0 This commit was not applied on nvd1/fkie fetcher. (From OE-Core rev: dd5efc4a242ec918dd276d10da8c68f606ba8809) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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