]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker/command: Add finishcommand to reset cooker state
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 Sep 2013 16:32:53 +0000 (17:32 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 Sep 2013 16:45:37 +0000 (17:45 +0100)
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>
lib/bb/command.py
lib/bb/cooker.py

index 641cc70619149639649022abd29bbaea2bfc5c7f..6c7b8919301196ea7f51bda5f832e2ebe97fac6e 100644 (file)
@@ -124,7 +124,7 @@ class Command:
         else:
             bb.event.fire(CommandCompleted(), self.cooker.event_data)
         self.currentAsyncCommand = None
-
+        self.cooker.finishcommand()
 
 class CommandsSync:
     """
index 4b2e5bf917d786d63677099bfb816a748f731e24..0a4dc7eb6253f5dc0131b5ae4242e5acde3256ad 100644 (file)
@@ -1246,6 +1246,9 @@ class BBCooker:
         else:
             self.state = state.shutdown
 
+    def finishcommand(self):
+        self.state = state.initial
+
     def initialize(self):
         self.initConfigurationData()