diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2013-06-17 12:11:52 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-17 16:09:10 +0100 |
commit | f5cadbe005303a9fe022aa20a5aa12630b849b54 (patch) | |
tree | 67083df647b17839c5d39f105f523ffac0fcb8fa /bitbake | |
parent | 3ea9d647ec35c4d30dcaa5b58e9471b775a4716c (diff) | |
download | poky-f5cadbe005303a9fe022aa20a5aa12630b849b54.tar.gz |
bitbake: knotty, bitbake: add option to terminate a remote server
I add an option to terminate a remote server gracefully
as not to need a kill command.
(Bitbake rev: 7495f835666a9561c2c7d84da7aaa74e4df55b9a)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/bitbake | 3 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index e77266b4ba..0d6b3ae4c9 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake | |||
@@ -197,6 +197,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters): | |||
197 | parser.add_option("", "--remote-server", help = "Connect to the specified server", | 197 | parser.add_option("", "--remote-server", help = "Connect to the specified server", |
198 | action = "store", dest = "remote_server", default = False) | 198 | action = "store", dest = "remote_server", default = False) |
199 | 199 | ||
200 | parser.add_option("-m", "--kill-server", help = "Terminate the remote server", | ||
201 | action = "store_true", dest = "kill_server", default = False) | ||
202 | |||
200 | parser.add_option("", "--observe-only", help = "Connect to a server as an observing-only client", | 203 | parser.add_option("", "--observe-only", help = "Connect to a server as an observing-only client", |
201 | action = "store_true", dest = "observe_only", default = False) | 204 | action = "store_true", dest = "observe_only", default = False) |
202 | 205 | ||
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index c6a1d3f98a..2c8293d985 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
@@ -250,6 +250,10 @@ def main(server, eventHandler, params, tf = TerminalFilter): | |||
250 | console.setFormatter(format) | 250 | console.setFormatter(format) |
251 | logger.addHandler(console) | 251 | logger.addHandler(console) |
252 | 252 | ||
253 | if params.options.remote_server and params.options.kill_server: | ||
254 | server.terminateServer() | ||
255 | return | ||
256 | |||
253 | if consolelogfile and not params.options.show_environment: | 257 | if consolelogfile and not params.options.show_environment: |
254 | bb.utils.mkdirhier(os.path.dirname(consolelogfile)) | 258 | bb.utils.mkdirhier(os.path.dirname(consolelogfile)) |
255 | conlogformat = bb.msg.BBLogFormatter(format_str) | 259 | conlogformat = bb.msg.BBLogFormatter(format_str) |