summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-08-13 00:58:11 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-15 08:49:37 (GMT)
commit61d83c6d6b23ea0fa3f99dfb53bf47c727c5a1c6 (patch)
treecbddb0ea6bd9505fc99eb8500b27980d65b9bd59 /bitbake/bin
parenta6c48298b17e6a5844b3638b422fe226e3b67b89 (diff)
downloadpoky-61d83c6d6b23ea0fa3f99dfb53bf47c727c5a1c6.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> (Bitbake rev: cb6c07054e8baf94614713ec257c643b22266d75) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake-layers6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 88fb8ea..119b15c 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -31,9 +31,10 @@ def main(args):
31 console.setFormatter(format) 31 console.setFormatter(format)
32 logger.addHandler(console) 32 logger.addHandler(console)
33 33
34 initialenv = os.environ.copy()
34 bb.utils.clean_environment() 35 bb.utils.clean_environment()
35 36
36 cmds = Commands() 37 cmds = Commands(initialenv)
37 if args: 38 if args:
38 cmds.onecmd(' '.join(args)) 39 cmds.onecmd(' '.join(args))
39 else: 40 else:
@@ -42,9 +43,8 @@ def main(args):
42 43
43 44
44class Commands(cmd.Cmd): 45class Commands(cmd.Cmd):
45 def __init__(self): 46 def __init__(self, initialenv):
46 cmd.Cmd.__init__(self) 47 cmd.Cmd.__init__(self)
47 initialenv = os.environ.copy()
48 self.returncode = 0 48 self.returncode = 0
49 self.config = Config(parse_only=True) 49 self.config = Config(parse_only=True)
50 self.cooker = bb.cooker.BBCooker(self.config, 50 self.cooker = bb.cooker.BBCooker(self.config,