summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-24 15:52:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-26 11:49:41 +0000
commitc08e2c2e20e89f8d825c19ed3032d27fc0b022dc (patch)
tree7b7a2ccd9b1c044f69f84ee6fd340e9123ee5744
parent9345140f096dd9f0daf4443d9ecc0b1e8f9b1693 (diff)
downloadpoky-c08e2c2e20e89f8d825c19ed3032d27fc0b022dc.tar.gz
bitbake: utils: Use internal fetcher function to avoid duplication
We currently have two lists of "proxy" or "fetcher" environment exports. Make the one in utils match the one on the fetcher which has a more complete list of variables now. (Bitbake rev: f9165a798a307a6f0fee120d5c3de660d3a44ae8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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):