[bitbake-devel] [PATCH 1/2] knotty, bitbake: add option to terminate a remote server
Alex DAMIAN
alexandru.damian at intel.com
Thu Jun 13 15:23:34 UTC 2013
From: Alexandru DAMIAN <alexandru.damian at intel.com>
I add an option to terminate a remote server gracefully
as not to need a kill command.
Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
bin/bitbake | 3 +++
lib/bb/ui/knotty.py | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/bin/bitbake b/bin/bitbake
index ef0c5d8..e924eec 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -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)
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 465203f..db73ddf 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -253,6 +253,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)
--
1.8.1.2
More information about the bitbake-devel
mailing list