summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2008-12-06 12:43:35 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2008-12-06 12:43:35 +0000
commitfa2293e8576ee784fb8c86c504ae453ef22e4509 (patch)
treeb39d392594041b3c315a32454e111c0db3d143ed
parent7c19c96919c55d848c594df7ef5cc21ac6a81b8c (diff)
downloadbitbake-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--ChangeLog4
-rw-r--r--lib/bb/cooker.py3
-rw-r--r--lib/bb/data.py2
-rw-r--r--lib/bb/utils.py7
4 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 54bcf9a64..a053ab839 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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'.