summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 64a004d0d8..3ce98d3179 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -1680,23 +1680,20 @@ def disable_network(uid=None, gid=None):
1680 1680
1681def export_proxies(d): 1681def export_proxies(d):
1682 """ export common proxies variables from datastore to environment """ 1682 """ export common proxies variables from datastore to environment """
1683 import os
1684 1683
1685 variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY', 1684 variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY',
1686 'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY', 1685 'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY',
1687 'GIT_PROXY_COMMAND'] 1686 'GIT_PROXY_COMMAND', 'SSL_CERT_FILE', 'SSL_CERT_DIR']
1688 exported = False
1689 1687
1690 for v in variables: 1688 origenv = d.getVar("BB_ORIGENV")
1691 if v in os.environ.keys(): 1689
1692 exported = True 1690 for name in variables:
1693 else: 1691 value = d.getVar(name)
1694 v_proxy = d.getVar(v) 1692 if not value and origenv:
1695 if v_proxy is not None: 1693 value = origenv.getVar(name)
1696 os.environ[v] = v_proxy 1694 if value:
1697 exported = True 1695 os.environ[name] = value
1698 1696
1699 return exported
1700 1697
1701 1698
1702def load_plugins(logger, plugins, pluginpath): 1699def load_plugins(logger, plugins, pluginpath):