mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 00:32:12 +02:00
bitbake: 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. (Bitbake rev: 335fd0106359dddfe1eeb0c7d0bc03f8454b895c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
38af7fef51
commit
c276e38bf8
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user