summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-12-18 11:56:34 +0000
committerSteve Sakoman <steve@sakoman.com>2024-12-18 06:43:48 -0800
commit704d1395b1839e83f98cabac7f623a8a7aaa0275 (patch)
tree8a3de2c320266311ce8633defd8f0cad583e37c7
parent2541a8171f91812a4b16e7dc4da0d77d2318a256 (diff)
downloadpoky-704d1395b1839e83f98cabac7f623a8a7aaa0275.tar.gz
cve-update-nvd2-native: Tweak to work better with NFS DL_DIR
After much debugging, the corruption issues on the autobuilder appear to be due to the way sqlite accesses database files. It doesn't change the file timestamp after making changes, which for reasons unknown, confuses NFS. As soon as the file is touched, NFS becomes fine again accross the whole cluster, as if by magic. We could try and debug further but putting a "touch" call into the code is easy and harmless. Lets hope this removes this annoying source of errors. (From OE-Core rev: b19b1e905d966443c4e4d17dfaeb299ae2526575) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-core/meta/cve-update-nvd2-native.bb2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/recipes-core/meta/cve-update-nvd2-native.bb b/meta/recipes-core/meta/cve-update-nvd2-native.bb
index 5fbe9095cc..c05c47d42e 100644
--- a/meta/recipes-core/meta/cve-update-nvd2-native.bb
+++ b/meta/recipes-core/meta/cve-update-nvd2-native.bb
@@ -85,6 +85,8 @@ python do_fetch() {
85 if update_db_file(db_tmp_file, d, database_time) == True: 85 if update_db_file(db_tmp_file, d, database_time) == True:
86 # Update downloaded correctly, can swap files 86 # Update downloaded correctly, can swap files
87 shutil.move(db_tmp_file, db_file) 87 shutil.move(db_tmp_file, db_file)
88 # Need to 'touch' the file to ensure NFS sees the data
89 os.utime(db_file)
88 else: 90 else:
89 # Update failed, do not modify the database 91 # Update failed, do not modify the database
90 bb.warn("CVE database update failed") 92 bb.warn("CVE database update failed")