summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/utils.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 4446997e42..0624a4f3e9 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -1698,22 +1698,11 @@ def disable_network(uid=None, gid=None):
1698 f.write("%s %s 1" % (gid, gid)) 1698 f.write("%s %s 1" % (gid, gid))
1699 1699
1700def export_proxies(d): 1700def export_proxies(d):
1701 from bb.fetch2 import get_fetcher_environment
1701 """ export common proxies variables from datastore to environment """ 1702 """ export common proxies variables from datastore to environment """
1702 1703 newenv = get_fetcher_environment(d)
1703 variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY', 1704 for v in newenv:
1704 'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY', 1705 os.environ[v] = newenv[v]
1705 'GIT_PROXY_COMMAND', 'SSL_CERT_FILE', 'SSL_CERT_DIR']
1706
1707 origenv = d.getVar("BB_ORIGENV")
1708
1709 for name in variables:
1710 value = d.getVar(name)
1711 if not value and origenv:
1712 value = origenv.getVar(name)
1713 if value:
1714 os.environ[name] = value
1715
1716
1717 1706
1718def load_plugins(logger, plugins, pluginpath): 1707def load_plugins(logger, plugins, pluginpath):
1719 def load_plugin(name): 1708 def load_plugin(name):