aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2015-10-08 09:11:55 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-12 14:33:49 +0100
commit92fb327b08e4f9cfb2400610c2983afe579b3592 (patch)
tree27f55506213e600e5729d97cb92ba62094b3de47
parent8779245ca404ec3851699b1e4309f9df3ff52a6c (diff)
downloadopenembedded-core-contrib-92fb327b08e4f9cfb2400610c2983afe579b3592.tar.gz
lib/oe/distro_check: Remove '_proxy' on dict values used by urllib.open
There are two ways to pass the proxies values into urllib.open: exporting the environment variables *_proxy and passing as dictionary into the urllib.open call. The latter is currenty used and values should not have the '_proxy' string, so removing it. Also, ignore uppercase proxies, these are not taken into account by the library. Tested on a network with proxy, adding 'inherit +="distrodata"' on local.conf with the following commands for distrotask in distrodataall distro_checkall checklicenseall; do bitbake universe -c $distrotask done [YOCTO #7567] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/lib/oe/distro_check.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index b3419ce03a..f92cd2e423 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -10,13 +10,8 @@ def create_socket(url, d):
def get_proxies(d):
import os
- proxykeys = ['HTTP_PROXY', 'http_proxy',
- 'HTTPS_PROXY', 'https_proxy',
- 'FTP_PROXY', 'ftp_proxy',
- 'FTPS_PROXY', 'ftps_proxy',
- 'NO_PROXY', 'no_proxy',
- 'ALL_PROXY', 'all_proxy']
- proxyvalues = map(lambda key: d.getVar(key, True), proxykeys)
+ proxykeys = ['http', 'https', 'ftp', 'ftps', 'no', 'all']
+ proxyvalues = map(lambda key: d.getVar(key+'_proxy', True), proxykeys)
return dict(zip(proxykeys, proxyvalues))
def get_links_from_url(url, d):