summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-10 12:03:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-10 13:24:03 +0000
commitc1864191732a4d221b02f0bce58129fb29e714d2 (patch)
tree561a9d2ea90530da2bf9380ad8ccf75623eb0a44 /bitbake/lib/bb/utils.py
parentb127874ee6f7b8801575a10f4b7df02783aafdeb (diff)
downloadopenembedded-core-c1864191732a4d221b02f0bce58129fb29e714d2.tar.gz
openembedded-core-c1864191732a4d221b02f0bce58129fb29e714d2.tar.bz2
openembedded-core-c1864191732a4d221b02f0bce58129fb29e714d2.zip
bitbake: Sync environment handling function names and comments with upstream alterations
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 48ed0d72e5..f04f4abe32 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -490,9 +490,9 @@ def sha256_file(filename):
s.update(line)
return s.hexdigest()
-# Variables which are preserved from the original environment *and* exported
-# into our worker context
-def preserved_envvars_export_list():
+def preserved_envvars_exported():
+ """Variables which are taken from the environment and placed in and exported
+ from the metadata"""
return [
'BB_TASKHASH',
'HOME',
@@ -505,9 +505,9 @@ def preserved_envvars_export_list():
'USERNAME',
]
-# Variables which are preserved from the original environment *and* exported
-# into our worker context for interactive tasks (e.g. requiring X)
-def preserved_envvars_export_interactive_list():
+def preserved_envvars_exported_interactive():
+ """Variables which are taken from the environment and placed in and exported
+ from the metadata, for interactive tasks"""
return [
'COLORTERM',
'DBUS_SESSION_BUS_ADDRESS',
@@ -525,8 +525,8 @@ def preserved_envvars_export_interactive_list():
'XDG_SESSION_COOKIE',
]
-# Variables which are preserved from the original environment into the datastore
-def preserved_envvars_list():
+def preserved_envvars():
+ """Variables which are taken from the environment and placed in the metadata"""
v = [
'BBPATH',
'BB_PRESERVE_ENV',
@@ -535,7 +535,7 @@ def preserved_envvars_list():
'LANG',
'_',
]
- return v + preserved_envvars_export_list() + preserved_envvars_export_interactive_list()
+ return v + preserved_envvars_exported() + preserved_envvars_exported_interactive()
def filter_environment(good_vars):
"""
@@ -557,8 +557,8 @@ def filter_environment(good_vars):
return removed_vars
-def create_intereactive_env(d):
- for k in preserved_envvars_export_interactive_list():
+def create_interactive_env(d):
+ for k in preserved_envvars_exported_interactive():
os.setenv(k, bb.data.getVar(k, d, True))
def clean_environment():
@@ -570,7 +570,7 @@ def clean_environment():
if 'BB_ENV_WHITELIST' in os.environ:
good_vars = os.environ['BB_ENV_WHITELIST'].split()
else:
- good_vars = preserved_envvars_list()
+ good_vars = preserved_envvars()
if 'BB_ENV_EXTRAWHITE' in os.environ:
good_vars.extend(os.environ['BB_ENV_EXTRAWHITE'].split())
filter_environment(good_vars)