From 704d1395b1839e83f98cabac7f623a8a7aaa0275 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 18 Dec 2024 11:56:34 +0000 Subject: 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 Signed-off-by: Steve Sakoman --- meta/recipes-core/meta/cve-update-nvd2-native.bb | 2 ++ 1 file changed, 2 insertions(+) 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() { 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") -- cgit v1.2.3-54-g00ecf