diff options
Diffstat (limited to 'bitbake/lib/bb/fetch/wget.py')
-rw-r--r-- | bitbake/lib/bb/fetch/wget.py | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch/wget.py b/bitbake/lib/bb/fetch/wget.py index 88193755d1..75357d539b 100644 --- a/bitbake/lib/bb/fetch/wget.py +++ b/bitbake/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: |