summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-10 10:09:35 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-11 14:16:03 +0000
commit9d5052d3ec26bbc24133f4048e90e7e77ff2c61e (patch)
tree9e57ab8111f104eee3d34d6209b8fd2c6a5bf218 /bitbake/lib/bb/cooker.py
parent53d2563ff13fcec74d4250bef5419e36169e55cc (diff)
downloadpoky-9d5052d3ec26bbc24133f4048e90e7e77ff2c61e.tar.gz
bitbake: 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 master rev: 42fa34142ea685f91115a551e74416ca28ef1c91) (Bitbake rev: bc2e0796c1846d1567db6343b24b85fd7dba9163) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py3
1 files changed, 2 insertions, 1 deletions
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):
61 """ 61 """
62 62
63class state: 63class state:
64 initial, parsing, running, shutdown, forceshutdown, stopped = range(6) 64 initial, parsing, running, shutdown, forceshutdown, stopped, error = range(7)
65 65
66 66
67class SkippedPackage: 67class SkippedPackage:
@@ -1321,6 +1321,7 @@ class BBCooker:
1321 self.prhost = prserv.serv.auto_start(self.data) 1321 self.prhost = prserv.serv.auto_start(self.data)
1322 except prserv.serv.PRServiceConfigError: 1322 except prserv.serv.PRServiceConfigError:
1323 bb.event.fire(CookerExit(), self.event_data) 1323 bb.event.fire(CookerExit(), self.event_data)
1324 self.state = state.error
1324 return 1325 return
1325 1326
1326 def post_serve(self): 1327 def post_serve(self):