diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-24 15:52:19 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-24 16:00:37 +0000 |
commit | f9165a798a307a6f0fee120d5c3de660d3a44ae8 (patch) | |
tree | 38b66912e5728bbc7761125d4a4e7ffcd7cde2be | |
parent | 956128e394581855bf0d03b32a975dc91c2a7e0c (diff) | |
download | bitbake-contrib-f9165a798a307a6f0fee120d5c3de660d3a44ae8.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/utils.py | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index 4446997e4..0624a4f3e 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -1698,22 +1698,11 @@ def disable_network(uid=None, gid=None): f.write("%s %s 1" % (gid, gid)) def export_proxies(d): + from bb.fetch2 import get_fetcher_environment """ export common proxies variables from datastore to environment """ - - variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY', - 'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY', - 'GIT_PROXY_COMMAND', 'SSL_CERT_FILE', 'SSL_CERT_DIR'] - - origenv = d.getVar("BB_ORIGENV") - - for name in variables: - value = d.getVar(name) - if not value and origenv: - value = origenv.getVar(name) - if value: - os.environ[name] = value - - + newenv = get_fetcher_environment(d) + for v in newenv: + os.environ[v] = newenv[v] def load_plugins(logger, plugins, pluginpath): def load_plugin(name): |