diff options
-rw-r--r-- | meta-yocto/conf/site.conf.sample | 16 | ||||
-rw-r--r-- | meta/classes/base.bbclass | 9 |
2 files changed, 17 insertions, 8 deletions
diff --git a/meta-yocto/conf/site.conf.sample b/meta-yocto/conf/site.conf.sample index d438298e84..68d1da91a9 100644 --- a/meta-yocto/conf/site.conf.sample +++ b/meta-yocto/conf/site.conf.sample | |||
@@ -22,17 +22,25 @@ SCONF_VERSION = "1" | |||
22 | #GIT_PROXY_PORT = "81" | 22 | #GIT_PROXY_PORT = "81" |
23 | #export GIT_PROXY_COMMAND = "${COREBASE}/scripts/oe-git-proxy-command" | 23 | #export GIT_PROXY_COMMAND = "${COREBASE}/scripts/oe-git-proxy-command" |
24 | 24 | ||
25 | # GIT_PROXY_IGNORE_* lines define hosts which do not require a proxy to access | 25 | # Set to yes to have a gitconfig generated for handling proxies; you |
26 | # might not want this if you have all that set in your global git | ||
27 | # configuration. If you don't enable it, the rest of the entries | ||
28 | # (_PROXY_IGNORE, etc) don't really work that well | ||
26 | #GIT_CORE_CONFIG = "Yes" | 29 | #GIT_CORE_CONFIG = "Yes" |
27 | #GIT_PROXY_IGNORE_1 = "host.server.com" | 30 | |
28 | #GIT_PROXY_IGNORE_2 = "another.server.com" | 31 | # Space separate list of hosts to ignore for GIT proxy |
32 | #GIT_PROXY_IGNORE = "host.server.com another.server.com" | ||
29 | 33 | ||
30 | # If SOCKS is available run the following command to comple a simple transport | 34 | # If SOCKS is available run the following command to comple a simple transport |
31 | # gcc scripts/oe-git-proxy-socks.c -o oe-git-proxy-socks | 35 | # gcc scripts/oe-git-proxy-socks.c -o oe-git-proxy-socks |
32 | # and then share that binary somewhere in PATH, then use the following settings | 36 | # and then share that binary somewhere in PATH, then use the following settings |
33 | #GIT_PROXY_HOST = "proxy.example.com" | 37 | #GIT_PROXY_HOST = "proxy.example.com" |
34 | #GIT_PROXY_PORT = "81" | 38 | #GIT_PROXY_PORT = "81" |
35 | #export GIT_PROXY_COMMAND = "${COREBASE}/scripts/oe-git-proxy-socks-command" | 39 | |
40 | # GIT_PROXY_COMMAND is used by git to override all proxy settings from | ||
41 | # configuration files, so we prefix OE_ to avoid breaking havoc on the | ||
42 | # generated (or local) gitconfig's. | ||
43 | #OE_GIT_PROXY_COMMAND = "${COREBASE}/scripts/oe-git-proxy-socks-command" | ||
36 | 44 | ||
37 | 45 | ||
38 | # Uncomment this to use a shared download directory | 46 | # Uncomment this to use a shared download directory |
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index e80e874360..a76fe55b89 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -111,16 +111,17 @@ python base_do_unpack() { | |||
111 | raise bb.build.FuncFailed(e) | 111 | raise bb.build.FuncFailed(e) |
112 | } | 112 | } |
113 | 113 | ||
114 | GIT_CONFIG = "${STAGING_DIR_NATIVE}/usr/etc/gitconfig" | 114 | GIT_CONFIG_PATH = "${STAGING_DIR_NATIVE}/etc" |
115 | GIT_CONFIG = "${GIT_CONFIG_PATH}/gitconfig" | ||
115 | 116 | ||
116 | def generate_git_config(e): | 117 | def generate_git_config(e): |
117 | from bb import data | 118 | from bb import data |
118 | 119 | ||
119 | if data.getVar('GIT_CORE_CONFIG', e.data, True): | 120 | if data.getVar('GIT_CORE_CONFIG', e.data, True): |
120 | gitconfig_path = e.data.getVar('GIT_CONFIG', True) | 121 | gitconfig_path = e.data.getVar('GIT_CONFIG', True) |
121 | proxy_command = " gitproxy = %s\n" % data.getVar('GIT_PROXY_COMMAND', e.data, True) | 122 | proxy_command = " gitProxy = %s\n" % data.getVar('OE_GIT_PROXY_COMMAND', e.data, True) |
122 | 123 | ||
123 | bb.mkdirhier(bb.data.expand("${STAGING_DIR_NATIVE}/usr/etc/", e.data)) | 124 | bb.mkdirhier(bb.data.expand("${GIT_CONFIG_PATH}", e.data)) |
124 | if (os.path.exists(gitconfig_path)): | 125 | if (os.path.exists(gitconfig_path)): |
125 | os.remove(gitconfig_path) | 126 | os.remove(gitconfig_path) |
126 | 127 | ||
@@ -128,7 +129,7 @@ def generate_git_config(e): | |||
128 | f.write("[core]\n") | 129 | f.write("[core]\n") |
129 | ignore_hosts = data.getVar('GIT_PROXY_IGNORE', e.data, True).split() | 130 | ignore_hosts = data.getVar('GIT_PROXY_IGNORE', e.data, True).split() |
130 | for ignore_host in ignore_hosts: | 131 | for ignore_host in ignore_hosts: |
131 | f.write(" gitproxy = none for %s\n" % ignore_host) | 132 | f.write(" gitProxy = none for %s\n" % ignore_host) |
132 | f.write(proxy_command) | 133 | f.write(proxy_command) |
133 | f.close | 134 | f.close |
134 | 135 | ||