]> code.ossystems Code Review - openembedded-core.git/commitdiff
cooker: add shutdown/stop methods
authorChris Larson <chris_larson@mentor.com>
Wed, 8 Dec 2010 20:08:18 +0000 (15:08 -0500)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 4 Jan 2011 14:46:47 +0000 (14:46 +0000)
(Bitbake rev: fc64eff03fe1f41e59128cb3df0ef2161e24a8cb)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/command.py
bitbake/lib/bb/cooker.py

index 654ede0e855545649a57961abe1201b0c56bf805..30c7240cf2bb41ffa350b2691a37b5c4d9637395 100644 (file)
@@ -124,13 +124,13 @@ class CommandsSync:
         """
         Trigger cooker 'shutdown' mode
         """
-        command.cooker.state = bb.cooker.state.shutdown
+        command.cooker.shutdown()
 
     def stateStop(self, command, params):
         """
         Stop the cooker
         """
-        command.cooker.state = bb.cooker.state.stop
+        command.cooker.stop()
 
     def getCmdLineAction(self, command, params):
         """
index 9f4afbb59e21c63a682b7b78e9b3b14aab8e5892..3b4eae8c4ccf4da38f37c9b499b104ea67f1c0cc 100644 (file)
@@ -953,6 +953,12 @@ def server_main(cooker, func, *args):
 
     return ret
 
+    def shutdown(self):
+        self.state = state.shutdown
+
+    def stop(self):
+        self.state = state.stop
+
 class CookerExit(bb.event.Event):
     """
     Notify clients of the Cooker shutdown