diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-10 12:03:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-10 13:24:03 +0000 |
commit | c1864191732a4d221b02f0bce58129fb29e714d2 (patch) | |
tree | 561a9d2ea90530da2bf9380ad8ccf75623eb0a44 /bitbake | |
parent | b127874ee6f7b8801575a10f4b7df02783aafdeb (diff) | |
download | openembedded-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')
-rw-r--r-- | bitbake/lib/bb/data.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/utils.py | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index 53ce7d62d3..198b628fad 100644 --- a/bitbake/lib/bb/data.py +++ b/bitbake/lib/bb/data.py @@ -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) 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) |