diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-04 17:56:58 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-06 17:40:01 +0000 |
| commit | 7f556c68619377224560066e92a88469919b335b (patch) | |
| tree | 403455e3a38dc2bf8bbea8314033128c912b1a5b /bitbake | |
| parent | 9043034da53658ab2db67da28699e8a01bfe5206 (diff) | |
| download | poky-7f556c68619377224560066e92a88469919b335b.tar.gz | |
bitbake: cooker: Clean up inotify idle handler
We no longer need to abstract the inotify callback handler, remove the
abstraction and simplify/clean up the code.
(Bitbake rev: af4ccab8acc49e91bf7647f209d69f4858618466)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 6 | ||||
| -rw-r--r-- | bitbake/lib/bb/server/process.py | 5 |
2 files changed, 3 insertions, 8 deletions
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: | |||
| 190 | 190 | ||
| 191 | self.inotify_modified_files = [] | 191 | self.inotify_modified_files = [] |
| 192 | 192 | ||
| 193 | def _process_inotify_updates(server, cooker, halt): | ||
| 194 | cooker.process_inotify_updates() | ||
| 195 | return 1.0 | ||
| 196 | |||
| 197 | self.idleCallBackRegister(_process_inotify_updates, self) | ||
| 198 | |||
| 199 | # TOSTOP must not be set or our children will hang when they output | 193 | # TOSTOP must not be set or our children will hang when they output |
| 200 | try: | 194 | try: |
| 201 | fd = sys.stdout.fileno() | 195 | 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(): | |||
| 157 | def wait_for_idle(self, timeout=30): | 157 | def wait_for_idle(self, timeout=30): |
| 158 | # Wait for the idle loop to have cleared | 158 | # Wait for the idle loop to have cleared |
| 159 | with self.idle_cond: | 159 | with self.idle_cond: |
| 160 | # FIXME - the 1 is the inotify processing in cooker which always runs | 160 | self.idle_cond.wait_for(lambda: len(self._idlefuns) == 0, timeout) |
| 161 | self.idle_cond.wait_for(lambda: len(self._idlefuns) <= 1, timeout) | ||
| 162 | 161 | ||
| 163 | def main(self): | 162 | def main(self): |
| 164 | self.cooker.pre_serve() | 163 | self.cooker.pre_serve() |
| @@ -387,6 +386,8 @@ class ProcessServer(): | |||
| 387 | nextsleep = 0.1 | 386 | nextsleep = 0.1 |
| 388 | fds = [] | 387 | fds = [] |
| 389 | 388 | ||
| 389 | self.cooker.process_inotify_updates() | ||
| 390 | |||
| 390 | with bb.utils.lock_timeout(self._idlefuncsLock): | 391 | with bb.utils.lock_timeout(self._idlefuncsLock): |
| 391 | items = list(self._idlefuns.items()) | 392 | items = list(self._idlefuns.items()) |
| 392 | 393 | ||
