diff options
-rw-r--r-- | bitbake/lib/bb/cooker.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index f435b18c87..1359d33f77 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -254,9 +254,14 @@ class BBCooker: | |||
254 | if not event.pathname in self.configwatcher.bbwatchedfiles: | 254 | if not event.pathname in self.configwatcher.bbwatchedfiles: |
255 | return | 255 | return |
256 | if "IN_ISDIR" in event.maskname: | 256 | if "IN_ISDIR" in event.maskname: |
257 | if "IN_CREATE" in event.maskname or "IN_DELETE" in event.maskname: | ||
258 | if event.pathname in self.configwatcher.bbseen: | ||
259 | self.configwatcher.bbseen.remove(event.pathname) | ||
260 | # Could remove all entries starting with the directory but for now... | ||
261 | bb.parse.clear_cache() | ||
257 | if "IN_CREATE" in event.maskname: | 262 | if "IN_CREATE" in event.maskname: |
258 | self.add_filewatch([[event.pathname]], watcher=self.configwatcher, dirs=True) | 263 | self.add_filewatch([[event.pathname]], watcher=self.configwatcher, dirs=True) |
259 | elif "IN_DELETE" in event.maskname and event.pathname in self.watcher.bbseen: | 264 | elif "IN_DELETE" in event.maskname and event.pathname in self.configwatcher.bbseen: |
260 | self.configwatcher.bbseen.remove(event.pathname) | 265 | self.configwatcher.bbseen.remove(event.pathname) |
261 | if not event.pathname in self.inotify_modified_files: | 266 | if not event.pathname in self.inotify_modified_files: |
262 | self.inotify_modified_files.append(event.pathname) | 267 | self.inotify_modified_files.append(event.pathname) |
@@ -272,6 +277,11 @@ class BBCooker: | |||
272 | or event.pathname.endswith("bitbake.lock"): | 277 | or event.pathname.endswith("bitbake.lock"): |
273 | return | 278 | return |
274 | if "IN_ISDIR" in event.maskname: | 279 | if "IN_ISDIR" in event.maskname: |
280 | if "IN_CREATE" in event.maskname or "IN_DELETE" in event.maskname: | ||
281 | if event.pathname in self.watcher.bbseen: | ||
282 | self.watcher.bbseen.remove(event.pathname) | ||
283 | # Could remove all entries starting with the directory but for now... | ||
284 | bb.parse.clear_cache() | ||
275 | if "IN_CREATE" in event.maskname: | 285 | if "IN_CREATE" in event.maskname: |
276 | self.add_filewatch([[event.pathname]], dirs=True) | 286 | self.add_filewatch([[event.pathname]], dirs=True) |
277 | elif "IN_DELETE" in event.maskname and event.pathname in self.watcher.bbseen: | 287 | elif "IN_DELETE" in event.maskname and event.pathname in self.watcher.bbseen: |