]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
knotty, bitbake: add option to terminate a remote server
authorAlexandru DAMIAN <alexandru.damian@intel.com>
Mon, 17 Jun 2013 11:11:52 +0000 (12:11 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Jun 2013 15:08:43 +0000 (16:08 +0100)
I add an option to terminate a remote server gracefully
as not to need a kill command.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bin/bitbake
lib/bb/ui/knotty.py

index e77266b4ba1c00bfd05b93d47f40ac5055711746..0d6b3ae4c948dafc30440200ed6d321c3873182b 100755 (executable)
@@ -197,6 +197,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
         parser.add_option("", "--remote-server", help = "Connect to the specified server",
                    action = "store", dest = "remote_server", default = False)
 
+        parser.add_option("-m", "--kill-server", help = "Terminate the remote server",
+                    action = "store_true", dest = "kill_server", default = False)
+
         parser.add_option("", "--observe-only", help = "Connect to a server as an observing-only client",
                    action = "store_true", dest = "observe_only", default = False)
 
index c6a1d3f98aff06c2e8df1d132d5059b4662bb684..2c8293d9852e39a91c778f7b6bf1cc419ce5fe29 100644 (file)
@@ -250,6 +250,10 @@ def main(server, eventHandler, params, tf = TerminalFilter):
     console.setFormatter(format)
     logger.addHandler(console)
 
+    if params.options.remote_server and params.options.kill_server:
+        server.terminateServer()
+        return
+
     if consolelogfile and not params.options.show_environment:
         bb.utils.mkdirhier(os.path.dirname(consolelogfile))
         conlogformat = bb.msg.BBLogFormatter(format_str)