summaryrefslogtreecommitdiffstats
path: root/bitbake-dev/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2008-11-04 19:13:03 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2008-11-04 19:13:03 +0000
commitc2ef2d4f5aedbf1d188e082d32c6e1e5f62891d9 (patch)
treec6e571997a723ca5fa7302eac19600ee986b212b /bitbake-dev/lib/bb
parent2bd4344e9aa3a72de10ed399449f558752bc7949 (diff)
downloadpoky-c2ef2d4f5aedbf1d188e082d32c6e1e5f62891d9.tar.gz
bitbake: Improve proxy handling got wget so urls can be excluded from the proxy
Diffstat (limited to 'bitbake-dev/lib/bb')
-rw-r--r--bitbake-dev/lib/bb/fetch/wget.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/bitbake-dev/lib/bb/fetch/wget.py b/bitbake-dev/lib/bb/fetch/wget.py
index 88193755d1..75357d539b 100644
--- a/bitbake-dev/lib/bb/fetch/wget.py
+++ b/bitbake-dev/lib/bb/fetch/wget.py
@@ -60,11 +60,30 @@ class Wget(Fetch):
60 else: 60 else:
61 fetchcmd = data.getVar("FETCHCOMMAND", d, 1) 61 fetchcmd = data.getVar("FETCHCOMMAND", d, 1)
62 62
63 uri = uri.split(";")[0]
64 uri_decoded = list(bb.decodeurl(uri))
65 uri_type = uri_decoded[0]
66 uri_host = uri_decoded[1]
67
63 bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri) 68 bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri)
64 fetchcmd = fetchcmd.replace("${URI}", uri.split(";")[0]) 69 fetchcmd = fetchcmd.replace("${URI}", uri)
65 fetchcmd = fetchcmd.replace("${FILE}", ud.basename) 70 fetchcmd = fetchcmd.replace("${FILE}", ud.basename)
66 httpproxy = data.getVar("http_proxy", d, True) 71 httpproxy = None
67 ftpproxy = data.getVar("ftp_proxy", d, True) 72 ftpproxy = None
73 if uri_type == 'http':
74 httpproxy = data.getVar("HTTP_PROXY", d, True)
75 httpproxy_ignore = data.getVar("HTTP_PROXY_IGNORE", d, True).split()
76 for p in httpproxy_ignore:
77 if uri_host.endswith(p):
78 httpproxy = None
79 break
80 if uri_type == 'ftp':
81 ftpproxy = data.getVar("FTP_PROXY", d, True)
82 ftpproxy_ignore = data.getVar("HTTP_PROXY_IGNORE", d, True).split()
83 for p in ftpproxy_ignore:
84 if uri_host.endswith(p):
85 ftpproxy = None
86 break
68 if httpproxy: 87 if httpproxy:
69 fetchcmd = "http_proxy=" + httpproxy + " " + fetchcmd 88 fetchcmd = "http_proxy=" + httpproxy + " " + fetchcmd
70 if ftpproxy: 89 if ftpproxy: