bitbake: Sync environment handling function names and comments with upstream alterations

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-01-10 12:03:40 +00:00
parent b127874ee6
commit c186419173
2 changed files with 13 additions and 13 deletions

View File

@ -161,7 +161,7 @@ def expandKeys(alterdata, readdata = None):
def inheritFromOS(d):
"""Inherit variables from the environment."""
exportlist = bb.utils.preserved_envvars_export_list()
exportlist = bb.utils.preserved_envvars_exported()
for s in os.environ.keys():
try:
setVar(s, os.environ[s], d)

View File

@ -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)