diff options
-rw-r--r-- | bitbake/lib/bb/utils.py | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 8c79159573..4446997e42 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -1699,23 +1699,20 @@ def disable_network(uid=None, gid=None): | |||
1699 | 1699 | ||
1700 | def export_proxies(d): | 1700 | def export_proxies(d): |
1701 | """ export common proxies variables from datastore to environment """ | 1701 | """ export common proxies variables from datastore to environment """ |
1702 | import os | ||
1703 | 1702 | ||
1704 | variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY', | 1703 | variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY', |
1705 | 'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY', | 1704 | 'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY', |
1706 | 'GIT_PROXY_COMMAND'] | 1705 | 'GIT_PROXY_COMMAND', 'SSL_CERT_FILE', 'SSL_CERT_DIR'] |
1707 | exported = False | ||
1708 | 1706 | ||
1709 | for v in variables: | 1707 | origenv = d.getVar("BB_ORIGENV") |
1710 | if v in os.environ.keys(): | 1708 | |
1711 | exported = True | 1709 | for name in variables: |
1712 | else: | 1710 | value = d.getVar(name) |
1713 | v_proxy = d.getVar(v) | 1711 | if not value and origenv: |
1714 | if v_proxy is not None: | 1712 | value = origenv.getVar(name) |
1715 | os.environ[v] = v_proxy | 1713 | if value: |
1716 | exported = True | 1714 | os.environ[name] = value |
1717 | 1715 | ||
1718 | return exported | ||
1719 | 1716 | ||
1720 | 1717 | ||
1721 | def load_plugins(logger, plugins, pluginpath): | 1718 | def load_plugins(logger, plugins, pluginpath): |