diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2008-12-06 12:43:35 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2008-12-06 12:43:35 +0000 |
commit | fa2293e8576ee784fb8c86c504ae453ef22e4509 (patch) | |
tree | b39d392594041b3c315a32454e111c0db3d143ed | |
parent | 7c19c96919c55d848c594df7ef5cc21ac6a81b8c (diff) | |
download | bitbake-fa2293e8576ee784fb8c86c504ae453ef22e4509.tar.gz |
utils.py: Add empty_environment() function and call this from the cooker instead of hiding in data.py (from Poky)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/bb/cooker.py | 3 | ||||
-rw-r--r-- | lib/bb/data.py | 2 | ||||
-rw-r--r-- | lib/bb/utils.py | 7 |
4 files changed, 14 insertions, 2 deletions
@@ -69,6 +69,10 @@ Changes in BitBake 1.8.x: - Improve lock file function error handling - Add username handling to the git fetcher (Robert Bragg) - Add support for HTTP_PROXY and HTTP_PROXY_IGNORE variables to the wget fetcher + - Export more variables to the fetcher commands to allow ssh checkouts and checkouts through + proxies to work better. (from Poky) + - Also allow user and pswd options in SRC_URIs globally (from Poky) + - Improve proxy handling when using mirrors (from Poky) Changes in BitBake 1.8.10: - Psyco is available only for x86 - do not use it on other architectures. diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 58f67bda8..6a6d254d7 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -596,6 +596,9 @@ class BBCooker: build. """ + # Wipe the OS environment + bb.utils.empty_environment() + if self.configuration.show_environment: self.showEnvironment(self.configuration.buildfile, self.configuration.pkgs_to_build) sys.exit( 0 ) diff --git a/lib/bb/data.py b/lib/bb/data.py index 82eef4498..19e67dbc3 100644 --- a/lib/bb/data.py +++ b/lib/bb/data.py @@ -331,8 +331,6 @@ def inheritFromOS(d): setVar(s, os.environ[s], d) except TypeError: pass - os.unsetenv(s) - del os.environ[s] def emit_var(var, o=sys.__stdout__, d = init(), all=False): """Emit a variable to be sourced by a shell.""" diff --git a/lib/bb/utils.py b/lib/bb/utils.py index aebeb3315..5015779f8 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -373,6 +373,13 @@ def clean_environment(): good_vars.extend(os.environ['BB_ENV_EXTRAWHITE'].split()) filter_environment(good_vars) +def empty_environment(): + """ + Remove all variables from the environment. + """ + for s in os.environ.keys(): + os.unsetenv(s) + del os.environ[s] def prunedir(topdir): # Delete everything reachable from the directory named in 'topdir'. |