[oe-commits] [bitbake] 05/19: bb/main.py: avoid starting server when not needed
git at git.openembedded.org
git at git.openembedded.org
Fri Jul 21 07:45:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository bitbake.
commit 335fd0106359dddfe1eeb0c7d0bc03f8454b895c
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Mon Jul 17 01:27:14 2017 -0700
bb/main.py: avoid starting server when not needed
Fixed 1:
$ . ../poky/oe-init-build-env-memres .
$ bitbake -m
$ bitbake -m # shutdown it again
$ bitbake -m
Starting bitbake server...
Terminated bitbake server.
It starts the server and kill it which is redundant.
$ bitbake -m
$ bitbake --status-only
Starting bitbake server...
It starts the server which is not what we need.
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/main.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/bb/main.py b/lib/bb/main.py
index 84fe904..b09513f 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -368,8 +368,10 @@ def bitbake_main(configParams, configuration):
configuration.debug_domains)
server_connection, ui_module = setup_bitbake(configParams, configuration)
- if server_connection is None and configParams.kill_server:
- return 0
+ # No server connection
+ if server_connection is None:
+ if configParams.status_only or configParams.kill_server:
+ return 1
if not configParams.server_only:
if configParams.status_only:
@@ -426,6 +428,10 @@ def setup_bitbake(configParams, configuration, extrafeatures=None, setup_logging
topdir, lock = lockBitbake()
sockname = topdir + "/bitbake.sock"
if lock:
+ if configParams.status_only or configParams.kill_server:
+ logger.info("bitbake server is not running.")
+ lock.close()
+ return None, None
# we start a server with a given configuration
logger.info("Starting bitbake server...")
server = bb.server.process.BitBakeServer(lock, sockname, configuration, featureset)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list