summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/main.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-09 18:59:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-10 12:47:48 +0100
commit4806d533044011811e78ac41c6aeee3de4224a1e (patch)
tree1ef70c7cb9f6ec66a3bd1ea73b20dbecc12693a7 /bitbake/lib/bb/main.py
parent6562bd58055650d23a0cd66018b25be624ae99b9 (diff)
downloadpoky-4806d533044011811e78ac41c6aeee3de4224a1e.tar.gz
bitbake: main: Fix environment handling for UI module imports
The environment was being cleared before the UI imports occurred which caused problems for graphical UIs like taskexp. The full environment was intended to be available to UI clients and it was only meant to be cleared for the server/cooker, so tweak the code order so this is the case. This fixes problems reported for taskexp. [YOCTO #12670] (Bitbake rev: ac15028391fdcc3fec2dd0e64a4f763ce63e5449) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/main.py')
-rwxr-xr-xbitbake/lib/bb/main.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py
index f4474e410f..732a315404 100755
--- a/bitbake/lib/bb/main.py
+++ b/bitbake/lib/bb/main.py
@@ -405,9 +405,6 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
405 # In status only mode there are no logs and no UI 405 # In status only mode there are no logs and no UI
406 logger.addHandler(handler) 406 logger.addHandler(handler)
407 407
408 # Clear away any spurious environment variables while we stoke up the cooker
409 cleanedvars = bb.utils.clean_environment()
410
411 if configParams.server_only: 408 if configParams.server_only:
412 featureset = [] 409 featureset = []
413 ui_module = None 410 ui_module = None
@@ -423,6 +420,10 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
423 420
424 server_connection = None 421 server_connection = None
425 422
423 # Clear away any spurious environment variables while we stoke up the cooker
424 # (done after import_extension_module() above since for example import gi triggers env var usage)
425 cleanedvars = bb.utils.clean_environment()
426
426 if configParams.remote_server: 427 if configParams.remote_server:
427 # Connect to a remote XMLRPC server 428 # Connect to a remote XMLRPC server
428 server_connection = bb.server.xmlrpcclient.connectXMLRPC(configParams.remote_server, featureset, 429 server_connection = bb.server.xmlrpcclient.connectXMLRPC(configParams.remote_server, featureset,