diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-07 14:20:48 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-11 17:21:46 +0000 |
| commit | 86f91f680aed553886d3e586b6bdad9cf7e38ae0 (patch) | |
| tree | 1bed704ccb8dae0b8e245c3ee2c927275addc8ac | |
| parent | e171e9a0886f35e8b783c73bc6b78d5987dda3c7 (diff) | |
| download | poky-86f91f680aed553886d3e586b6bdad9cf7e38ae0.tar.gz | |
bitbake: bitbake: cooker: Handle inofity queue overflows more gracefully
If many files change and the inotify queue overflows, rather than print
a traceback, invalidate the caches and warn the user.
[YOCTO #10676]
(Bitbake rev: 058f8517c041b80e8b591ad7d34a68281b2d03fc)
(Bitbake rev: 4fafb6c6d261de78dd1bc3824a1389d191b70321)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index d112f8219c..0f48efca6a 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -252,6 +252,10 @@ class BBCooker: | |||
| 252 | signal.signal(signal.SIGHUP, self.sigterm_exception) | 252 | signal.signal(signal.SIGHUP, self.sigterm_exception) |
| 253 | 253 | ||
| 254 | def config_notifications(self, event): | 254 | def config_notifications(self, event): |
| 255 | if event.maskname == "IN_Q_OVERFLOW": | ||
| 256 | bb.warn("inotify event queue overflowed, invalidating caches.") | ||
| 257 | self.baseconfig_valid = False | ||
| 258 | return | ||
| 255 | if not event.pathname in self.configwatcher.bbwatchedfiles: | 259 | if not event.pathname in self.configwatcher.bbwatchedfiles: |
| 256 | return | 260 | return |
| 257 | if not event.pathname in self.inotify_modified_files: | 261 | if not event.pathname in self.inotify_modified_files: |
| @@ -259,6 +263,10 @@ class BBCooker: | |||
| 259 | self.baseconfig_valid = False | 263 | self.baseconfig_valid = False |
| 260 | 264 | ||
| 261 | def notifications(self, event): | 265 | def notifications(self, event): |
| 266 | if event.maskname == "IN_Q_OVERFLOW": | ||
| 267 | bb.warn("inotify event queue overflowed, invalidating caches.") | ||
| 268 | self.parsecache_valid = False | ||
| 269 | return | ||
| 262 | if not event.pathname in self.inotify_modified_files: | 270 | if not event.pathname in self.inotify_modified_files: |
| 263 | self.inotify_modified_files.append(event.pathname) | 271 | self.inotify_modified_files.append(event.pathname) |
| 264 | self.parsecache_valid = False | 272 | self.parsecache_valid = False |
