]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: command: provide a means to shut down from the client in memres mode
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 13 Dec 2016 07:07:05 +0000 (20:07 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 14 Dec 2016 12:25:07 +0000 (12:25 +0000)
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>
bitbake/lib/bb/command.py
bitbake/lib/bb/cooker.py
bitbake/lib/bb/cookerdata.py

index caa3e4d457d9357f9a4b88e50def14ff6bfa0667..012b35faf6be06612fd986641f6b5de235e51460 100644 (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
+
index 5e5708ee2bb05b71602f8291cd4a7ac89c90e5b2..2614c4485a1723f40d2d7569080444dab2882087 100644 (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
index 320bb5906c6cd0f79922c5775b8d6a879ff715c7..c6e958b43cf60744acb97c0c3b0b39ce6464f449 100644 (file)
@@ -146,6 +146,7 @@ class CookerConfiguration(object):
         self.tracking = False
         self.interface = []
         self.writeeventlog = False
+        self.server_only = False
 
         self.env = {}