summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 43e9f18018..b4486f3078 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -144,6 +144,10 @@ class BBCooker:
144 self.watcher.bbwatchedfiles = [] 144 self.watcher.bbwatchedfiles = []
145 self.notifier = pyinotify.Notifier(self.watcher, self.notifications) 145 self.notifier = pyinotify.Notifier(self.watcher, self.notifications)
146 146
147 # If being called by something like tinfoil, we need to clean cached data
148 # which may now be invalid
149 bb.parse.__mtime_cache = {}
150 bb.parse.BBHandler.cached_statements = {}
147 151
148 self.initConfigurationData() 152 self.initConfigurationData()
149 153
@@ -197,13 +201,13 @@ class BBCooker:
197 def config_notifications(self, event): 201 def config_notifications(self, event):
198 if not event.pathname in self.configwatcher.bbwatchedfiles: 202 if not event.pathname in self.configwatcher.bbwatchedfiles:
199 return 203 return
200 if not event.path in self.inotify_modified_files: 204 if not event.pathname in self.inotify_modified_files:
201 self.inotify_modified_files.append(event.path) 205 self.inotify_modified_files.append(event.pathname)
202 self.baseconfig_valid = False 206 self.baseconfig_valid = False
203 207
204 def notifications(self, event): 208 def notifications(self, event):
205 if not event.path in self.inotify_modified_files: 209 if not event.pathname in self.inotify_modified_files:
206 self.inotify_modified_files.append(event.path) 210 self.inotify_modified_files.append(event.pathname)
207 self.parsecache_valid = False 211 self.parsecache_valid = False
208 212
209 def add_filewatch(self, deps, watcher=None): 213 def add_filewatch(self, deps, watcher=None):
@@ -1505,6 +1509,8 @@ class BBCooker:
1505 # reload files for which we got notifications 1509 # reload files for which we got notifications
1506 for p in self.inotify_modified_files: 1510 for p in self.inotify_modified_files:
1507 bb.parse.update_cache(p) 1511 bb.parse.update_cache(p)
1512 if p in bb.parse.BBHandler.cached_statements:
1513 del bb.parse.BBHandler.cached_statements[p]
1508 self.inotify_modified_files = [] 1514 self.inotify_modified_files = []
1509 1515
1510 if not self.baseconfig_valid: 1516 if not self.baseconfig_valid: