From: Richard Purdie Date: Fri, 13 Sep 2013 16:32:53 +0000 (+0100) Subject: cooker/command: Add finishcommand to reset cooker state X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd15648fc2654b8d7c3e00ea7ab3dbf04f24f24b;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git cooker/command: Add finishcommand to reset cooker state After running a command on the server, it needs to reset to the initial state. This ensures that subsequent clients start from a known state and notice any configuration changes. Ultimately we may want to do more than this buts a good start and better than nothing. Signed-off-by: Richard Purdie --- diff --git a/lib/bb/command.py b/lib/bb/command.py index 641cc706191..6c7b8919301 100644 --- a/lib/bb/command.py +++ b/lib/bb/command.py @@ -124,7 +124,7 @@ class Command: else: bb.event.fire(CommandCompleted(), self.cooker.event_data) self.currentAsyncCommand = None - + self.cooker.finishcommand() class CommandsSync: """ diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 4b2e5bf917d..0a4dc7eb625 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -1246,6 +1246,9 @@ class BBCooker: else: self.state = state.shutdown + def finishcommand(self): + self.state = state.initial + def initialize(self): self.initConfigurationData()