diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-12-16 23:44:29 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-12-18 11:58:23 +0000 |
commit | 7adaec468d3a61d88c990b1b319b34850bee7e44 (patch) | |
tree | f4de759d9c8d7574ec75aad7466cbc024f28c458 | |
parent | bf3815404775d6bcb29f8a63bbedac03e2fd7a0b (diff) | |
download | poky-7adaec468d3a61d88c990b1b319b34850bee7e44.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: f642edb006a8c16dbe45681afe547eabfae17073)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/meta/cve-update-nvd2-native.bb | 2 |
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 a68a8bb89f..8ef13bdde6 100644 --- a/meta/recipes-core/meta/cve-update-nvd2-native.bb +++ b/meta/recipes-core/meta/cve-update-nvd2-native.bb | |||
@@ -90,6 +90,8 @@ python do_fetch() { | |||
90 | if update_db_file(db_tmp_file, d, database_time) == True: | 90 | if update_db_file(db_tmp_file, d, database_time) == True: |
91 | # Update downloaded correctly, can swap files | 91 | # Update downloaded correctly, can swap files |
92 | shutil.move(db_tmp_file, db_file) | 92 | shutil.move(db_tmp_file, db_file) |
93 | # Need to 'touch' the file to ensure NFS sees the data | ||
94 | os.utime(db_file) | ||
93 | else: | 95 | else: |
94 | # Update failed, do not modify the database | 96 | # Update failed, do not modify the database |
95 | bb.warn("CVE database update failed") | 97 | bb.warn("CVE database update failed") |