summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-07-25 11:27:55 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-26 13:46:27 +0100
commit50016106ad1e165a60639bfbc7b31e9c66ae5474 (patch)
tree1b54f7ad4bf216f61d59969b5b1c8b6b732065e7 /bitbake/lib/bb/data.py
parent3300065035cc9900340e15796fa0b33391c055c3 (diff)
downloadpoky-50016106ad1e165a60639bfbc7b31e9c66ae5474.tar.gz
data|cooker: use saved environment variables when calling inheritFromOS
Now that we have a pristine copy of the variables available at launch time we can use them when looking to inherit the OS's environment. (Bitbake rev: 21c21fcc5871e81d8d497b6baed605cdd74c4571) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 2269f9dc74..65144bfe52 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -159,12 +159,12 @@ def expandKeys(alterdata, readdata = None):
159 ekey = todolist[key] 159 ekey = todolist[key]
160 renameVar(key, ekey, alterdata) 160 renameVar(key, ekey, alterdata)
161 161
162def inheritFromOS(d): 162def inheritFromOS(d, savedenv):
163 """Inherit variables from the environment.""" 163 """Inherit variables from the initial environment."""
164 exportlist = bb.utils.preserved_envvars_exported() 164 exportlist = bb.utils.preserved_envvars_exported()
165 for s in os.environ.keys(): 165 for s in savedenv.keys():
166 try: 166 try:
167 setVar(s, os.environ[s], d) 167 setVar(s, getVar(s, savedenv, True), d)
168 if s in exportlist: 168 if s in exportlist:
169 setVarFlag(s, "export", True, d) 169 setVarFlag(s, "export", True, d)
170 except TypeError: 170 except TypeError: