aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-08-12 17:58:11 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-15 09:41:13 +0100
commitcb6c07054e8baf94614713ec257c643b22266d75 (patch)
treeec0cabe1dd58931bc7113a7d8ceda385a2121a39 /bin
parent7627b561cbcb1482b464d69db70f38ea663180f3 (diff)
downloadbitbake-cb6c07054e8baf94614713ec257c643b22266d75.tar.gz
Ensure only the filtered environment variables are inherited from the OS
The recent change which modified inheritFromOS to use the intial environment, rather than the current environment, introduced a bug such that variables which had been cleaned from the environment where still set in the data store. This patch changes things such that a list of approved environment variables is saved after the environment is cleaned and only the variables in this list are inherited in inheritFromOS. CC: James Limbouris <james.limbouris@gmail.com> CC: Chris Larson <clarson@kergoth.com> Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbake-layers6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/bitbake-layers b/bin/bitbake-layers
index 88fb8ea93..119b15c17 100755
--- a/bin/bitbake-layers
+++ b/bin/bitbake-layers
@@ -31,9 +31,10 @@ def main(args):
console.setFormatter(format)
logger.addHandler(console)
+ initialenv = os.environ.copy()
bb.utils.clean_environment()
- cmds = Commands()
+ cmds = Commands(initialenv)
if args:
cmds.onecmd(' '.join(args))
else:
@@ -42,9 +43,8 @@ def main(args):
class Commands(cmd.Cmd):
- def __init__(self):
+ def __init__(self, initialenv):
cmd.Cmd.__init__(self)
- initialenv = os.environ.copy()
self.returncode = 0
self.config = Config(parse_only=True)
self.cooker = bb.cooker.BBCooker(self.config,