summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-06 13:42:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-14 16:59:12 +0100
commitaf1041a6af4a244fa9bbcddb17716489b6119337 (patch)
tree2926b7e11b0968ad0d6e0cb7464defbc5ae30671 /bitbake
parentc93f050cd28e5aea1e8a2f9fb82f282f5dfa27e2 (diff)
downloadtizen-distro-af1041a6af4a244fa9bbcddb17716489b6119337.tar.gz
tizen-distro-af1041a6af4a244fa9bbcddb17716489b6119337.tar.bz2
tizen-distro-af1041a6af4a244fa9bbcddb17716489b6119337.zip
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')
-rw-r--r--bitbake/lib/bb/command.py2
-rw-r--r--bitbake/lib/bb/cooker.py3
2 files changed, 4 insertions, 1 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:
def runAsyncCommand(self):
try:
+ if self.cooker.state == bb.cooker.state.error:
+ return False
if self.currentAsyncCommand is not None:
(command, options) = self.currentAsyncCommand
commandmethod = getattr(CommandsAsync, command)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index ad36b34aa4..b504f45da6 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -61,7 +61,7 @@ class CollectionError(bb.BBHandledException):
"""
class state:
- initial, parsing, running, shutdown, forceshutdown, stopped = range(6)
+ initial, parsing, running, shutdown, forceshutdown, stopped, error = range(7)
class SkippedPackage:
@@ -1321,6 +1321,7 @@ class BBCooker:
self.prhost = prserv.serv.auto_start(self.data)
except prserv.serv.PRServiceConfigError:
bb.event.fire(CookerExit(), self.event_data)
+ self.state = state.error
return
def post_serve(self):