bitbake: command: provide a means to shut down from the client in memres mode

In memory resident mode we don't really want to actually shut down since
it's only the client going away.

(Bitbake rev: 74db369c46043116359101cab70486afd82372c0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton 2016-12-13 20:07:05 +13:00 committed by Richard Purdie
parent d325d94f3f
commit e271d7dc60
3 changed files with 16 additions and 0 deletions

View File

@ -472,3 +472,11 @@ class CommandsAsync:
command.finishAsyncCommand()
resetCooker.needcache = False
def clientComplete(self, command, params):
"""
Do the right thing when the controlling client exits
"""
command.cooker.clientComplete()
command.finishAsyncCommand()
clientComplete.needcache = False

View File

@ -1725,6 +1725,13 @@ class BBCooker:
def reset(self):
self.initConfigurationData()
def clientComplete(self):
"""Called when the client is done using the server"""
if self.configuration.server_only:
self.finishcommand()
else:
self.shutdown(True)
def lockBitbake(self):
if not hasattr(self, 'lock'):
self.lock = None

View File

@ -146,6 +146,7 @@ class CookerConfiguration(object):
self.tracking = False
self.interface = []
self.writeeventlog = False
self.server_only = False
self.env = {}