diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-13 17:32:53 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-13 17:45:37 +0100 |
commit | dd15648fc2654b8d7c3e00ea7ab3dbf04f24f24b (patch) | |
tree | 578ae8e1e8d6aff4b72d4f99b2fc7dbe79c51494 | |
parent | 12e9d33bfae5294e3870dfd1202f63383ad05e92 (diff) | |
download | bitbake-dd15648fc2654b8d7c3e00ea7ab3dbf04f24f24b.tar.gz |
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 <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/command.py | 2 | ||||
-rw-r--r-- | lib/bb/cooker.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/command.py b/lib/bb/command.py index 641cc7061..6c7b89193 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 4b2e5bf91..0a4dc7eb6 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() |