[oe-commits] [bitbake] 06/15: command: provide a means to shut down from the client in memres mode
git at git.openembedded.org
git at git.openembedded.org
Wed Dec 14 09:57:47 UTC 2016
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 74db369c46043116359101cab70486afd82372c0
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Tue Dec 13 20:07:05 2016 +1300
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.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/command.py | 8 ++++++++
lib/bb/cooker.py | 7 +++++++
lib/bb/cookerdata.py | 1 +
3 files changed, 16 insertions(+)
diff --git a/lib/bb/command.py b/lib/bb/command.py
index caa3e4d..012b35f 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -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
+
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 5e5708e..2614c44 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -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
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 320bb59..c6e958b 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -146,6 +146,7 @@ class CookerConfiguration(object):
self.tracking = False
self.interface = []
self.writeeventlog = False
+ self.server_only = False
self.env = {}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list