summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2008-10-22 22:24:03 +0100
committerRichard Purdie <rpurdie@rpsys.net>2008-10-22 22:24:03 +0100
commitede20a32458a01fbc3da95c82447b49fb2b25a94 (patch)
tree20d50c2963e870e808fb746a4d91256d5c3cbee5 /bitbake
parent4329a29db5666adc95388c2cc2ebfacb07a81637 (diff)
downloadpoky-ede20a32458a01fbc3da95c82447b49fb2b25a94.tar.gz
bitbake: Improve proxy variable handling in fetchers
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch/__init__.py6
-rw-r--r--bitbake/lib/bb/fetch/wget.py7
2 files changed, 13 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index a4ede2b77f..ab7a9bed92 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -465,6 +465,12 @@ class Fetch(object):
465 uri = stash + tarfn 465 uri = stash + tarfn
466 bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri) 466 bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri)
467 fetchcmd = fetchcmd.replace("${URI}", uri) 467 fetchcmd = fetchcmd.replace("${URI}", uri)
468 httpproxy = data.getVar("http_proxy", d, True)
469 ftpproxy = data.getVar("ftp_proxy", d, True)
470 if httpproxy:
471 fetchcmd = "http_proxy=" + httpproxy + " " + fetchcmd
472 if ftpproxy:
473 fetchcmd = "ftp_proxy=" + ftpproxy + " " + fetchcmd
468 ret = os.system(fetchcmd) 474 ret = os.system(fetchcmd)
469 if ret == 0: 475 if ret == 0:
470 bb.msg.note(1, bb.msg.domain.Fetcher, "Fetched %s from tarball stash, skipping checkout" % tarfn) 476 bb.msg.note(1, bb.msg.domain.Fetcher, "Fetched %s from tarball stash, skipping checkout" % tarfn)
diff --git a/bitbake/lib/bb/fetch/wget.py b/bitbake/lib/bb/fetch/wget.py
index 739d5a1bc6..c125ecb59b 100644
--- a/bitbake/lib/bb/fetch/wget.py
+++ b/bitbake/lib/bb/fetch/wget.py
@@ -63,7 +63,14 @@ class Wget(Fetch):
63 bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri) 63 bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri)
64 fetchcmd = fetchcmd.replace("${URI}", uri) 64 fetchcmd = fetchcmd.replace("${URI}", uri)
65 fetchcmd = fetchcmd.replace("${FILE}", ud.basename) 65 fetchcmd = fetchcmd.replace("${FILE}", ud.basename)
66 httpproxy = data.getVar("http_proxy", d, True)
67 ftpproxy = data.getVar("ftp_proxy", d, True)
68 if httpproxy:
69 fetchcmd = "http_proxy=" + httpproxy + " " + fetchcmd
70 if ftpproxy:
71 fetchcmd = "ftp_proxy=" + ftpproxy + " " + fetchcmd
66 bb.msg.debug(2, bb.msg.domain.Fetcher, "executing " + fetchcmd) 72 bb.msg.debug(2, bb.msg.domain.Fetcher, "executing " + fetchcmd)
73 sys.exit(1)
67 ret = os.system(fetchcmd) 74 ret = os.system(fetchcmd)
68 if ret != 0: 75 if ret != 0:
69 return False 76 return False