summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-28 16:19:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-28 23:02:32 +0100
commit0f85c54385f325f3ebbf911b35bbac11b8863b6b (patch)
treeba7c9145073e40ceedfdac58098ef27c1df1af71
parent8633b7cd03cfaba3e0359aa5da22fc76b66768c7 (diff)
downloadbitbake-contrib-0f85c54385f325f3ebbf911b35bbac11b8863b6b.tar.gz
bitbake-contrib-0f85c54385f325f3ebbf911b35bbac11b8863b6b.tar.bz2
bitbake-contrib-0f85c54385f325f3ebbf911b35bbac11b8863b6b.zip
main: Always return 0 for bitbake --kill-server
If the server isn't running return 0 as to do otherwise complicates scripts which do cleanup of bitbake servers which would potentially be memory resident. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xlib/bb/main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/main.py b/lib/bb/main.py
index 5ca3485096..431f6f4794 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -277,7 +277,7 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
parser.add_option("-m", "--kill-server", action="store_true",
dest="kill_server", default=False,
- help="Terminate the bitbake server.")
+ help="Terminate any running bitbake server.")
parser.add_option("", "--observe-only", action="store_true",
dest="observe_only", default=False,
@@ -370,8 +370,10 @@ def bitbake_main(configParams, configuration):
server_connection, ui_module = setup_bitbake(configParams, configuration)
# No server connection
if server_connection is None:
- if configParams.status_only or configParams.kill_server:
+ if configParams.status_only:
return 1
+ if configParams.kill_server:
+ return 0
if not configParams.server_only:
if configParams.status_only: