[oe-commits] [bitbake] 03/16: bb/main.py: avoid starting server when not needed
git at git.openembedded.org
git at git.openembedded.org
Wed Jul 19 10:43:47 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 5db7646a0aa7dbb2a1616b4744c489262f64e623
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 c797e62..f102f1b 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:
+ print("bitbake server is not running.")
+ lock.close()
+ return None, None
# we start a server with a given configuration
print("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