diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-07-22 10:21:00 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-25 12:54:17 +0100 |
commit | e51d542e78b70c2f854bd8b14b24dfd3f43a5ff4 (patch) | |
tree | 5e8a2a9cfe460d0bb797d6df065c5b9fff8dbab4 /bitbake/lib/bb | |
parent | 72e0b43e0149ba63936aae69bc6028e997f7df12 (diff) | |
download | ast2050-yocto-poky-e51d542e78b70c2f854bd8b14b24dfd3f43a5ff4.zip ast2050-yocto-poky-e51d542e78b70c2f854bd8b14b24dfd3f43a5ff4.tar.gz |
bitbake|cooker: save a copy of the environment when BitBake is started
Create a data store in the cooker containing the values of the environment
from when BitBake is launched such that child processes can replicate
(and/or use values from) the host environment, rather than the cleaned up
environment that the main BitBake process uses.
(Bitbake rev: 54c7206165c0e7cfe5f7b243c80461baf5e7dfb1)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index b0ddb2e..044ceb1 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -78,7 +78,7 @@ class BBCooker: Manages one bitbake build run """ - def __init__(self, configuration, server_registration_cb): + def __init__(self, configuration, server_registration_cb, savedenv={}): self.status = None self.appendlist = {} self.skiplist = {} @@ -87,6 +87,14 @@ class BBCooker: self.configuration = configuration + # Keep a datastore of the initial environment variables and their + # values from when BitBake was launched to enable child processes + # to use environment variables which have been cleaned from the + # BitBake processes env + self.savedenv = bb.data.init() + for k in savedenv: + self.savedenv.setVar(k, savedenv[k]) + self.caches_array = [] # Currently, only Image Creator hob ui needs extra cache. # So, we save Extra Cache class name and container file |