summaryrefslogtreecommitdiffstats
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-11-23 15:57:32 +0000
commit8883ee32f2a77bf532832d4fad5c20912a1a3630 (patch)
tree54ec3ac53145d3c7bccbf4a13574a24a92b9f8bc
parent9f65c15e14c874e00dddf5631529f2c527006e9d (diff)
downloadpoky-8883ee32f2a77bf532832d4fad5c20912a1a3630.tar.gz
poky-8883ee32f2a77bf532832d4fad5c20912a1a3630.tar.bz2
poky-8883ee32f2a77bf532832d4fad5c20912a1a3630.zip
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: 2e4845c526117d5524cff910afbb6f8212a3e199) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 7711b290de..85d933266b 100755
--- a/bitbake/lib/bb/main.py
+++ b/bitbake/lib/bb/main.py
@@ -401,9 +401,6 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
# In status only mode there are no logs and no UI
logger.addHandler(handler)
- # Clear away any spurious environment variables while we stoke up the cooker
- cleanedvars = bb.utils.clean_environment()
-
if configParams.server_only:
featureset = []
ui_module = None
@@ -419,6 +416,10 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
server_connection = None
+ # Clear away any spurious environment variables while we stoke up the cooker
+ # (done after import_extension_module() above since for example import gi triggers env var usage)
+ cleanedvars = bb.utils.clean_environment()
+
if configParams.remote_server:
# Connect to a remote XMLRPC server
server_connection = bb.server.xmlrpcclient.connectXMLRPC(configParams.remote_server, featureset,