From 246bd1861367066db325bb12a90551319675ad7b Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Wed, 8 Dec 2010 15:08:18 -0500 Subject: cooker: add shutdown/stop methods (Bitbake rev: fc64eff03fe1f41e59128cb3df0ef2161e24a8cb) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/command.py | 4 ++-- bitbake/lib/bb/cooker.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 654ede0e85..30c7240cf2 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -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): """ diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 9f4afbb59e..3b4eae8c4c 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -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 -- cgit v1.2.3-54-g00ecf