diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-07-25 11:27:55 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-26 13:46:27 +0100 |
commit | 50016106ad1e165a60639bfbc7b31e9c66ae5474 (patch) | |
tree | 1b54f7ad4bf216f61d59969b5b1c8b6b732065e7 /bitbake | |
parent | 3300065035cc9900340e15796fa0b33391c055c3 (diff) | |
download | poky-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')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/data.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 044ceb179e..f99d78634f 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -135,7 +135,7 @@ class BBCooker: | |||
135 | if not self.server_registration_cb: | 135 | if not self.server_registration_cb: |
136 | bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data) | 136 | bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data) |
137 | 137 | ||
138 | bb.data.inheritFromOS(self.configuration.data) | 138 | bb.data.inheritFromOS(self.configuration.data, self.savedenv) |
139 | 139 | ||
140 | try: | 140 | try: |
141 | self.parseConfigurationFiles(self.configuration.prefile, | 141 | self.parseConfigurationFiles(self.configuration.prefile, |
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 | ||
162 | def inheritFromOS(d): | 162 | def 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: |