diff options
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index c631ec7e6d..1797a1d4ca 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -339,6 +339,14 @@ class BBCooker: | |||
| 339 | providerlog.error("Root privilege is required to modify max_user_watches.") | 339 | providerlog.error("Root privilege is required to modify max_user_watches.") |
| 340 | raise | 340 | raise |
| 341 | 341 | ||
| 342 | def handle_inotify_updates(self): | ||
| 343 | # reload files for which we got notifications | ||
| 344 | for p in self.inotify_modified_files: | ||
| 345 | bb.parse.update_cache(p) | ||
| 346 | if p in bb.parse.BBHandler.cached_statements: | ||
| 347 | del bb.parse.BBHandler.cached_statements[p] | ||
| 348 | self.inotify_modified_files = [] | ||
| 349 | |||
| 342 | def sigterm_exception(self, signum, stackframe): | 350 | def sigterm_exception(self, signum, stackframe): |
| 343 | if signum == signal.SIGTERM: | 351 | if signum == signal.SIGTERM: |
| 344 | bb.warn("Cooker received SIGTERM, shutting down...") | 352 | bb.warn("Cooker received SIGTERM, shutting down...") |
| @@ -368,6 +376,7 @@ class BBCooker: | |||
| 368 | if mod not in self.orig_sysmodules: | 376 | if mod not in self.orig_sysmodules: |
| 369 | del sys.modules[mod] | 377 | del sys.modules[mod] |
| 370 | 378 | ||
| 379 | self.handle_inotify_updates() | ||
| 371 | self.setupConfigWatcher() | 380 | self.setupConfigWatcher() |
| 372 | 381 | ||
| 373 | # Need to preserve BB_CONSOLELOG over resets | 382 | # Need to preserve BB_CONSOLELOG over resets |
| @@ -1614,12 +1623,7 @@ class BBCooker: | |||
| 1614 | if self.state == state.running: | 1623 | if self.state == state.running: |
| 1615 | return | 1624 | return |
| 1616 | 1625 | ||
| 1617 | # reload files for which we got notifications | 1626 | self.handle_inotify_updates() |
| 1618 | for p in self.inotify_modified_files: | ||
| 1619 | bb.parse.update_cache(p) | ||
| 1620 | if p in bb.parse.BBHandler.cached_statements: | ||
| 1621 | del bb.parse.BBHandler.cached_statements[p] | ||
| 1622 | self.inotify_modified_files = [] | ||
| 1623 | 1627 | ||
| 1624 | if not self.baseconfig_valid: | 1628 | if not self.baseconfig_valid: |
| 1625 | logger.debug("Reloading base configuration data") | 1629 | logger.debug("Reloading base configuration data") |
