diff options
author | Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | 2012-03-01 09:44:34 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-01 16:35:53 +0000 |
commit | 7bb36e5da0d28404d7b272135045cdb5cb160472 (patch) | |
tree | 4b8938cdb645adc42d2738696add2b4d4a2a34bc /meta/classes/base.bbclass | |
parent | 18af1f5b19eb61615aee6eb6d4238f6b2f403e25 (diff) | |
download | poky-7bb36e5da0d28404d7b272135045cdb5cb160472.tar.gz |
site.conf.sample: Fix broken SOCKS proxy setup and configuration
SOCKS proxy specification with git was using conflicting methods and
thus was failing when mixed SOCKS needs were in place (requiring no
proxy for some hosts and proxy for the rest)
- GIT_PROXY_COMMAND is an environment variable GIT uses to OVERRIDE
all proxy configuration in ~/.gitconfig or any other gitconfig. By
using it to configure, it was breaking havoc on site git
configuration or the one generated by bitbake in tmp/.
Renamed to OE_GIT_PROXY_COMMAND in meta/conf/site.conf.sample
(with a doc tidbit on the name chosen), meta/classes/base.bbclass.
- The gitconfig generated by bitbake was wrong. There was a typo error
(gitproxy vs gitProxy), thus all lines were being ignored. Fixed in
meta/classes/base.bbclass.
- The gitconfig generated was being placed in
${STAGING_DIR_NATIVE}/usr/etc/gitconfig; git was looking for it in
${STAGING_DIR_NATIVE}/etc/gitconfig. Fixed that in
meta/classes/base.bbclass, at the same time creating a
GIT_CONFIG_PATH variable, since it is also referenced in
generate_git_config() and have all instances refer to that.
(From OE-Core rev: e579eb7f33462258c8e82a0936d970593614840d)
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r-- | meta/classes/base.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
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 | ||