]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cve-update-nvd2-native: Tweak to work better with NFS DL_DIR
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Dec 2024 11:56:34 +0000 (11:56 +0000)
committerSteve Sakoman <steve@sakoman.com>
Wed, 18 Dec 2024 15:05:54 +0000 (07:05 -0800)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-core/meta/cve-update-nvd2-native.bb

index dc742df06db267cf316211940588cf726545853d..5d0a7564aa7c2f9693b2081c04656ba7aec90da1 100644 (file)
@@ -85,6 +85,8 @@ python do_fetch() {
     if update_db_file(db_tmp_file, d, database_time) == True:
         # Update downloaded correctly, can swap files
         shutil.move(db_tmp_file, db_file)
+        # Need to 'touch' the file to ensure NFS sees the data
+        os.utime(db_file)
     else:
         # Update failed, do not modify the database
         bb.warn("CVE database update failed")