diff options
author | Ryan Phillips <ryan_d_phillips@dell.com> | 2010-06-08 14:20:55 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:36 +0100 |
commit | 40d7de8f06d789983ce060287f7517a440f1682c (patch) | |
tree | 541c8b6d8983c51f4a9fe43b3dc7c0c7421f60ab /bitbake/lib/bb/fetch/wget.py | |
parent | 88a257634a7a681d711e4401a7109d8742e9a166 (diff) | |
download | openembedded-core-40d7de8f06d789983ce060287f7517a440f1682c.tar.gz openembedded-core-40d7de8f06d789983ce060287f7517a440f1682c.tar.bz2 openembedded-core-40d7de8f06d789983ce060287f7517a440f1682c.zip |
Change wget fetcher to use the runfetchcmd
* Fixes proxy support to honor standard proxy environment variables.
* Quote environment variables
(Bitbake rev: f84f382f340d6db15b9e5afb8c7c93969249a958)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch/wget.py')
-rw-r--r-- | bitbake/lib/bb/fetch/wget.py | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/bitbake/lib/bb/fetch/wget.py b/bitbake/lib/bb/fetch/wget.py index 581362038a..dcc58c75e8 100644 --- a/bitbake/lib/bb/fetch/wget.py +++ b/bitbake/lib/bb/fetch/wget.py @@ -31,6 +31,7 @@ from bb import data from bb.fetch import Fetch from bb.fetch import FetchError from bb.fetch import encodeurl, decodeurl +from bb.fetch import runfetchcmd class Wget(Fetch): """Class to fetch urls via 'wget'""" @@ -65,33 +66,12 @@ class Wget(Fetch): uri_type = uri_decoded[0] uri_host = uri_decoded[1] - bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri) fetchcmd = fetchcmd.replace("${URI}", uri.split(";")[0]) fetchcmd = fetchcmd.replace("${FILE}", ud.basename) - httpproxy = None - ftpproxy = None - if uri_type == 'http': - httpproxy = data.getVar("HTTP_PROXY", d, True) - httpproxy_ignore = (data.getVar("HTTP_PROXY_IGNORE", d, True) or "").split() - for p in httpproxy_ignore: - if uri_host.endswith(p): - httpproxy = None - break - if uri_type == 'ftp': - ftpproxy = data.getVar("FTP_PROXY", d, True) - ftpproxy_ignore = (data.getVar("HTTP_PROXY_IGNORE", d, True) or "").split() - for p in ftpproxy_ignore: - if uri_host.endswith(p): - ftpproxy = None - break - if httpproxy: - fetchcmd = "http_proxy=" + httpproxy + " " + fetchcmd - if ftpproxy: - fetchcmd = "ftp_proxy=" + ftpproxy + " " + fetchcmd + + bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri) bb.msg.debug(2, bb.msg.domain.Fetcher, "executing " + fetchcmd) - ret = os.system(fetchcmd) - if ret != 0: - return False + runfetchcmd(fetchcmd, d) # Sanity check since wget can pretend it succeed when it didn't # Also, this used to happen if sourceforge sent us to the mirror page |