This email list is read-only.  Emails sent to this list will be discarded
----------------------------------
 .gitignore                       |    1 +
 bitbake-dev/lib/bb/fetch/wget.py |   25 ++++++++++++++++++++++---
 bitbake/lib/bb/fetch/wget.py     |   25 ++++++++++++++++++++++---
 meta/classes/base.bbclass        |    7 ++-----
 4 files changed, 47 insertions(+), 11 deletions(-)

New commits:
commit 7fdff0f3cde54edee2b9aadb83e8e3d21d6f4f8f
Author: Richard Purdie <[EMAIL PROTECTED]>
Date:   Tue Nov 4 19:13:25 2008 +0000

    base.bbclass: Improve the git proxy syntax to match the http/ftp syntax too

commit c2ef2d4f5aedbf1d188e082d32c6e1e5f62891d9
Author: Richard Purdie <[EMAIL PROTECTED]>
Date:   Tue Nov 4 19:13:03 2008 +0000

    bitbake: Improve proxy handling got wget so urls can be excluded from the 
proxy

commit 2bd4344e9aa3a72de10ed399449f558752bc7949
Author: Richard Purdie <[EMAIL PROTECTED]>
Date:   Tue Nov 4 19:10:58 2008 +0000

    .gitignore: Add build/conf/local.conf


Diff in this email is a maximum of 400 lines.
diff --git a/.gitignore b/.gitignore
index b196971..0b13ee1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 *.pyc
+build/conf/local.conf
 build/tmp/
 sources/
 meta-moblin-internal
diff --git a/bitbake-dev/lib/bb/fetch/wget.py b/bitbake-dev/lib/bb/fetch/wget.py
index 8819375..75357d5 100644
--- a/bitbake-dev/lib/bb/fetch/wget.py
+++ b/bitbake-dev/lib/bb/fetch/wget.py
@@ -60,11 +60,30 @@ class Wget(Fetch):
             else:
                 fetchcmd = data.getVar("FETCHCOMMAND", d, 1)
 
+            uri = uri.split(";")[0]
+            uri_decoded = list(bb.decodeurl(uri))
+            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("${URI}", uri)
             fetchcmd = fetchcmd.replace("${FILE}", ud.basename)
-            httpproxy = data.getVar("http_proxy", d, True)
-            ftpproxy = data.getVar("ftp_proxy", d, True)
+            httpproxy = None
+            ftpproxy = None
+            if uri_type == 'http':
+                httpproxy = data.getVar("HTTP_PROXY", d, True)
+                httpproxy_ignore = data.getVar("HTTP_PROXY_IGNORE", d, 
True).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).split()
+                for p in ftpproxy_ignore:
+                    if uri_host.endswith(p):
+                        ftpproxy = None
+                        break
             if httpproxy:
                 fetchcmd = "http_proxy=" + httpproxy + " " + fetchcmd
             if ftpproxy:
diff --git a/bitbake/lib/bb/fetch/wget.py b/bitbake/lib/bb/fetch/wget.py
index 8819375..75357d5 100644
--- a/bitbake/lib/bb/fetch/wget.py
+++ b/bitbake/lib/bb/fetch/wget.py
@@ -60,11 +60,30 @@ class Wget(Fetch):
             else:
                 fetchcmd = data.getVar("FETCHCOMMAND", d, 1)
 
+            uri = uri.split(";")[0]
+            uri_decoded = list(bb.decodeurl(uri))
+            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("${URI}", uri)
             fetchcmd = fetchcmd.replace("${FILE}", ud.basename)
-            httpproxy = data.getVar("http_proxy", d, True)
-            ftpproxy = data.getVar("ftp_proxy", d, True)
+            httpproxy = None
+            ftpproxy = None
+            if uri_type == 'http':
+                httpproxy = data.getVar("HTTP_PROXY", d, True)
+                httpproxy_ignore = data.getVar("HTTP_PROXY_IGNORE", d, 
True).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).split()
+                for p in ftpproxy_ignore:
+                    if uri_host.endswith(p):
+                        ftpproxy = None
+                        break
             if httpproxy:
                 fetchcmd = "http_proxy=" + httpproxy + " " + fetchcmd
             if ftpproxy:
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 1b70bfd..76b2138 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -742,12 +742,9 @@ def generate_git_config(e):
 
                 f = open(gitconfig_path, 'w')
                 f.write("[core]\n")
-                ignore_count = 1
-                ignore_host = data.getVar('GIT_PROXY_IGNORE_1', e.data, True)
-                while (ignore_host):
+                ignore_hosts = data.getVar('GIT_PROXY_IGNORE', e.data, 
True).split()
+                for ignore_host in ignore_hosts:
                         f.write("    gitproxy = none for %s\n" % ignore_host)
-                        ignore_count += 1
-                        ignore_host = data.getVar('GIT_PROXY_IGNORE_%s' % 
ignore_count, e.data, True)
                 f.write(proxy_command)
                 f.close
 
_______________________________________________
Commits mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/commits

Reply via email to