summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-09 12:57:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-13 09:28:14 +0100
commita0f729d31d15d8314016d0e19e5e115b5761d535 (patch)
treeaf4d72d4546519ccca0087e9d8bd1329bc1e6dbe /bitbake/lib/bb/cooker.py
parent019f518287bb00f7e7121289b4859661af201d89 (diff)
downloadopenembedded-core-contrib-a0f729d31d15d8314016d0e19e5e115b5761d535.tar.gz
bitbake: 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. (Bitbake rev: ec60459fe2ba16966544eebff43b061abb7ed3ba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 77b7f3dde1..b3d6cd9e34 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -189,7 +189,7 @@ class BBCooker:
# If being called by something like tinfoil, we need to clean cached data
# which may now be invalid
- bb.parse.__mtime_cache = {}
+ bb.parse.clear_cache()
bb.parse.BBHandler.cached_statements = {}
self.ui_cmdline = None
@@ -247,7 +247,9 @@ class BBCooker:
def config_notifications(self, event):
if event.maskname == "IN_Q_OVERFLOW":
bb.warn("inotify event queue overflowed, invalidating caches.")
+ self.parsecache_valid = False
self.baseconfig_valid = False
+ bb.parse.clear_cache()
return
if not event.pathname in self.configwatcher.bbwatchedfiles:
return
@@ -259,6 +261,7 @@ class BBCooker:
if event.maskname == "IN_Q_OVERFLOW":
bb.warn("inotify event queue overflowed, invalidating caches.")
self.parsecache_valid = False
+ bb.parse.clear_cache()
return
if not event.pathname in self.inotify_modified_files:
self.inotify_modified_files.append(event.pathname)