Message ID | 20240516070031.590112-1-richard.purdie@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | cooker: Add an os.sync() call to revalidateCaches() | expand |
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 939a999974..d4595c1ec2 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -350,6 +350,11 @@ class BBCooker: def revalidateCaches(self): bb.parse.clear_cache() + # Unfortunately we've seen issues where changes are made by the UI side and are + # in the disk cache but these tests don't pick up the file changes as they're + # still proceeding through the VFS. Use the sync to avoid this. + os.sync() + clean = True for f in self.configwatched: if not bb.parse.check_mtime(f, self.configwatched[f]):
Unfortunately we've seen issues where changes are made by the UI side and are in the disk cache but these tests don't pick up the file changes as they're still proceeding through the VFS. Any example is [YOCTO #15318] where logs showed a workspace and bbappend being setup with devtool-source intercept but the server did not fully pick up those changes leading to initial_rev (from devtool-source.bbclass) being missing. Add a sync call to try and avoid this despite the speed implications. This was probably the kind of issue which led us to removing the inotify code since that was also unsafe with concurrency since there was no way to flush it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/bb/cooker.py | 5 +++++ 1 file changed, 5 insertions(+)