summaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/fetch2/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index e8fbe89a3..6ef0c6fe7 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -813,8 +813,9 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None):
if not cleanup:
cleanup = []
+ origenv = d.getVar("BB_ORIGENV", False)
for var in exportvars:
- val = d.getVar(var, True) or d.getVar("BB_ORIGENV", False).getVar(var, True)
+ val = d.getVar(var, True) or (origenv and origenv.getVar(var, True))
if val:
cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)