diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-09 12:57:57 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-09 23:45:28 +0100 |
commit | ec60459fe2ba16966544eebff43b061abb7ed3ba (patch) | |
tree | db81adc6d690e453e81ae18ec89a5c55ecc2cb90 /lib/bb/parse | |
parent | bf76cd7e5881adf264b8ba64e27a5b6ca9df4fde (diff) | |
download | bitbake-contrib-ec60459fe2ba16966544eebff43b061abb7ed3ba.tar.gz |
cooker: Improve inotify overflow handling
Add a proper function for clearing the mtime cache. Clean up the inotify
event overflow case to err on the side of caution and clear any potentially
now out of sync caches.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/parse')
-rw-r--r-- | lib/bb/parse/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py index a2952ecc0..2fc4002db 100644 --- a/lib/bb/parse/__init__.py +++ b/lib/bb/parse/__init__.py @@ -84,6 +84,10 @@ def update_cache(f): logger.debug(1, "Updating mtime cache for %s" % f) update_mtime(f) +def clear_cache(): + global __mtime_cache + __mtime_cache = {} + def mark_dependency(d, f): if f.startswith('./'): f = "%s/%s" % (os.getcwd(), f[2:]) |