This email list is read-only.  Emails sent to this list will be discarded
----------------------------------
 bitbake-dev/lib/bb/fetch/__init__.py |    6 ++++++
 bitbake-dev/lib/bb/fetch/wget.py     |    7 +++++++
 bitbake/lib/bb/fetch/__init__.py     |    6 ++++++
 bitbake/lib/bb/fetch/wget.py         |    7 +++++++
 4 files changed, 26 insertions(+), 0 deletions(-)

New commits:
commit ede20a32458a01fbc3da95c82447b49fb2b25a94
Author: Richard Purdie <[EMAIL PROTECTED]>
Date:   Wed Oct 22 22:24:03 2008 +0100

    bitbake: Improve proxy variable handling in fetchers


Diff in this email is a maximum of 400 lines.
diff --git a/bitbake-dev/lib/bb/fetch/__init__.py 
b/bitbake-dev/lib/bb/fetch/__init__.py
index a4ede2b..ab7a9be 100644
--- a/bitbake-dev/lib/bb/fetch/__init__.py
+++ b/bitbake-dev/lib/bb/fetch/__init__.py
@@ -465,6 +465,12 @@ class Fetch(object):
             uri = stash + tarfn
             bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri)
             fetchcmd = fetchcmd.replace("${URI}", uri)
+            httpproxy = data.getVar("http_proxy", d, True)
+            ftpproxy = data.getVar("ftp_proxy", d, True)
+            if httpproxy:
+                fetchcmd = "http_proxy=" + httpproxy + " " + fetchcmd
+            if ftpproxy:
+                fetchcmd = "ftp_proxy=" + ftpproxy + " " + fetchcmd
             ret = os.system(fetchcmd)
             if ret == 0:
                 bb.msg.note(1, bb.msg.domain.Fetcher, "Fetched %s from tarball 
stash, skipping checkout" % tarfn)
diff --git a/bitbake-dev/lib/bb/fetch/wget.py b/bitbake-dev/lib/bb/fetch/wget.py
index 739d5a1..c125ecb 100644
--- a/bitbake-dev/lib/bb/fetch/wget.py
+++ b/bitbake-dev/lib/bb/fetch/wget.py
@@ -63,7 +63,14 @@ class Wget(Fetch):
             bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri)
             fetchcmd = fetchcmd.replace("${URI}", uri)
             fetchcmd = fetchcmd.replace("${FILE}", ud.basename)
+            httpproxy = data.getVar("http_proxy", d, True)
+            ftpproxy = data.getVar("ftp_proxy", d, True)
+            if httpproxy:
+                fetchcmd = "http_proxy=" + httpproxy + " " + fetchcmd
+            if ftpproxy:
+                fetchcmd = "ftp_proxy=" + ftpproxy + " " + fetchcmd
             bb.msg.debug(2, bb.msg.domain.Fetcher, "executing " + fetchcmd)
+            sys.exit(1)
             ret = os.system(fetchcmd)
             if ret != 0:
                 return False
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index a4ede2b..ab7a9be 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -465,6 +465,12 @@ class Fetch(object):
             uri = stash + tarfn
             bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri)
             fetchcmd = fetchcmd.replace("${URI}", uri)
+            httpproxy = data.getVar("http_proxy", d, True)
+            ftpproxy = data.getVar("ftp_proxy", d, True)
+            if httpproxy:
+                fetchcmd = "http_proxy=" + httpproxy + " " + fetchcmd
+            if ftpproxy:
+                fetchcmd = "ftp_proxy=" + ftpproxy + " " + fetchcmd
             ret = os.system(fetchcmd)
             if ret == 0:
                 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 739d5a1..c125ecb 100644
--- a/bitbake/lib/bb/fetch/wget.py
+++ b/bitbake/lib/bb/fetch/wget.py
@@ -63,7 +63,14 @@ class Wget(Fetch):
             bb.msg.note(1, bb.msg.domain.Fetcher, "fetch " + uri)
             fetchcmd = fetchcmd.replace("${URI}", uri)
             fetchcmd = fetchcmd.replace("${FILE}", ud.basename)
+            httpproxy = data.getVar("http_proxy", d, True)
+            ftpproxy = data.getVar("ftp_proxy", d, True)
+            if httpproxy:
+                fetchcmd = "http_proxy=" + httpproxy + " " + fetchcmd
+            if ftpproxy:
+                fetchcmd = "ftp_proxy=" + ftpproxy + " " + fetchcmd
             bb.msg.debug(2, bb.msg.domain.Fetcher, "executing " + fetchcmd)
+            sys.exit(1)
             ret = os.system(fetchcmd)
             if ret != 0:
                 return False
_______________________________________________
Commits mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/commits

Reply via email to