summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/data.py
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-09-30 20:57:18 +0000
committerRichard Purdie <richard@openedhand.com>2008-09-30 20:57:18 +0000
commit2e182847e4a780c58c5b8046eb98f7f6c8970ea1 (patch)
treedc3ccf060b2b04c8af29c75607260052bc92673b /bitbake/lib/bb/data.py
parent221ac2b25f544a500869667d8f95c6c12c80db1a (diff)
downloadopenembedded-core-2e182847e4a780c58c5b8046eb98f7f6c8970ea1.tar.gz
openembedded-core-2e182847e4a780c58c5b8046eb98f7f6c8970ea1.tar.bz2
openembedded-core-2e182847e4a780c58c5b8046eb98f7f6c8970ea1.tar.xz
openembedded-core-2e182847e4a780c58c5b8046eb98f7f6c8970ea1.zip
bitbake/bitbake-dev: Allow much better control of which variable influence bitbake from the environment
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5347 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py21
1 files changed, 6 insertions, 15 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 54b2615af..82eef4498 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -324,21 +324,15 @@ def expandData(alterdata, readdata = None):
if val != expanded:
setVar(key, expanded, alterdata)
-import os
-
def inheritFromOS(d):
"""Inherit variables from the environment."""
-# fakeroot needs to be able to set these
- non_inherit_vars = [ "LD_LIBRARY_PATH", "LD_PRELOAD" ]
for s in os.environ.keys():
- if not s in non_inherit_vars:
- try:
- setVar(s, os.environ[s], d)
- setVarFlag(s, 'matchesenv', '1', d)
- except TypeError:
- pass
-
-import sys
+ try:
+ setVar(s, os.environ[s], d)
+ except TypeError:
+ pass
+ os.unsetenv(s)
+ del os.environ[s]
def emit_var(var, o=sys.__stdout__, d = init(), all=False):
"""Emit a variable to be sourced by a shell."""
@@ -379,9 +373,6 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
o.write('unset %s\n' % varExpanded)
return 1
- if getVarFlag(var, 'matchesenv', d):
- return 0
-
val.rstrip()
if not val:
return 0