diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-06 13:42:39 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-14 16:59:12 +0100 |
commit | 3ca820de91c2456a1b1c44022072f6ce7aa21344 (patch) | |
tree | 17e8e2fee1633549eb9f5b7226f63df138ad303c /bitbake/lib/bb/command.py | |
parent | f41922d0c787a73b4b84de783d0720d13ededec4 (diff) | |
download | poky-3ca820de91c2456a1b1c44022072f6ce7aa21344.tar.gz |
bitbake: cooker/command: Add error state for the server and use for pre_serve errors
Currently if errors occur when starting the PR service, there is a race that
occurs since the UI runs various commands including starting builds before
processing the CookerExit(). By adding the error state and refusing to run
async commands in this mode, builds are prevented from starting and the
UI reaches the exit code with the system shutting down cleanly.
(Bitbake rev: 42fa34142ea685f91115a551e74416ca28ef1c91)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/command.py')
-rw-r--r-- | bitbake/lib/bb/command.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 3ca27a69e0..a2795ce0b7 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
@@ -86,6 +86,8 @@ class Command: | |||
86 | 86 | ||
87 | def runAsyncCommand(self): | 87 | def runAsyncCommand(self): |
88 | try: | 88 | try: |
89 | if self.cooker.state == bb.cooker.state.error: | ||
90 | return False | ||
89 | if self.currentAsyncCommand is not None: | 91 | if self.currentAsyncCommand is not None: |
90 | (command, options) = self.currentAsyncCommand | 92 | (command, options) = self.currentAsyncCommand |
91 | commandmethod = getattr(CommandsAsync, command) | 93 | commandmethod = getattr(CommandsAsync, command) |