summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 92d44c5260..66a8a08c21 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -1635,23 +1635,20 @@ def disable_network(uid=None, gid=None):
1635 1635
1636def export_proxies(d): 1636def export_proxies(d):
1637 """ export common proxies variables from datastore to environment """ 1637 """ export common proxies variables from datastore to environment """
1638 import os
1639 1638
1640 variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY', 1639 variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY',
1641 'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY', 1640 'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY',
1642 'GIT_PROXY_COMMAND'] 1641 'GIT_PROXY_COMMAND', 'SSL_CERT_FILE', 'SSL_CERT_DIR']
1643 exported = False
1644 1642
1645 for v in variables: 1643 origenv = d.getVar("BB_ORIGENV")
1646 if v in os.environ.keys(): 1644
1647 exported = True 1645 for name in variables:
1648 else: 1646 value = d.getVar(name)
1649 v_proxy = d.getVar(v) 1647 if not value and origenv:
1650 if v_proxy is not None: 1648 value = origenv.getVar(name)
1651 os.environ[v] = v_proxy 1649 if value:
1652 exported = True 1650 os.environ[name] = value
1653 1651
1654 return exported
1655 1652
1656 1653
1657def load_plugins(logger, plugins, pluginpath): 1654def load_plugins(logger, plugins, pluginpath):