diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 1d347ddc52..d2c42c858d 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -190,12 +190,6 @@ class BBCooker: self.inotify_modified_files = [] - def _process_inotify_updates(server, cooker, halt): - cooker.process_inotify_updates() - return 1.0 - - self.idleCallBackRegister(_process_inotify_updates, self) - # TOSTOP must not be set or our children will hang when they output try: fd = sys.stdout.fileno() diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index b5f6faf6fb..81e5229c9d 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py @@ -157,8 +157,7 @@ class ProcessServer(): def wait_for_idle(self, timeout=30): # Wait for the idle loop to have cleared with self.idle_cond: - # FIXME - the 1 is the inotify processing in cooker which always runs - self.idle_cond.wait_for(lambda: len(self._idlefuns) <= 1, timeout) + self.idle_cond.wait_for(lambda: len(self._idlefuns) == 0, timeout) def main(self): self.cooker.pre_serve() @@ -387,6 +386,8 @@ class ProcessServer(): nextsleep = 0.1 fds = [] + self.cooker.process_inotify_updates() + with bb.utils.lock_timeout(self._idlefuncsLock): items = list(self._idlefuns.items())