diff options
| -rw-r--r-- | bitbake-dev/lib/bb/fetch/__init__.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 2 | ||||
| -rw-r--r-- | meta/classes/base.bbclass | 8 |
3 files changed, 5 insertions, 7 deletions
diff --git a/bitbake-dev/lib/bb/fetch/__init__.py b/bitbake-dev/lib/bb/fetch/__init__.py index 784f19eccb..e6b2851b91 100644 --- a/bitbake-dev/lib/bb/fetch/__init__.py +++ b/bitbake-dev/lib/bb/fetch/__init__.py | |||
| @@ -274,7 +274,7 @@ def runfetchcmd(cmd, d, quiet = False): | |||
| 274 | # rather than host provided | 274 | # rather than host provided |
| 275 | # Also include some other variables. | 275 | # Also include some other variables. |
| 276 | # FIXME: Should really include all export varaiables? | 276 | # FIXME: Should really include all export varaiables? |
| 277 | exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'http_proxy', 'ftp_proxy'] | 277 | exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'GIT_CONFIG', 'http_proxy', 'ftp_proxy'] |
| 278 | 278 | ||
| 279 | for var in exportvars: | 279 | for var in exportvars: |
| 280 | val = data.getVar(var, d, True) | 280 | val = data.getVar(var, d, True) |
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 784f19eccb..e6b2851b91 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
| @@ -274,7 +274,7 @@ def runfetchcmd(cmd, d, quiet = False): | |||
| 274 | # rather than host provided | 274 | # rather than host provided |
| 275 | # Also include some other variables. | 275 | # Also include some other variables. |
| 276 | # FIXME: Should really include all export varaiables? | 276 | # FIXME: Should really include all export varaiables? |
| 277 | exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'http_proxy', 'ftp_proxy'] | 277 | exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'GIT_CONFIG', 'http_proxy', 'ftp_proxy'] |
| 278 | 278 | ||
| 279 | for var in exportvars: | 279 | for var in exportvars: |
| 280 | val = data.getVar(var, d, True) | 280 | val = data.getVar(var, d, True) |
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 9c8cdd8d15..1b70bfdd5f 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
| @@ -725,13 +725,15 @@ def base_get_metadata_svn_revision(d): | |||
| 725 | pass | 725 | pass |
| 726 | return revision | 726 | return revision |
| 727 | 727 | ||
| 728 | GIT_CONFIG = "${STAGING_DIR_NATIVE}/usr/etc/gitconfig" | ||
| 729 | |||
| 728 | def generate_git_config(e): | 730 | def generate_git_config(e): |
| 729 | import bb | 731 | import bb |
| 730 | import os | 732 | import os |
| 731 | from bb import data | 733 | from bb import data |
| 732 | 734 | ||
| 733 | if data.getVar('GIT_CORE_CONFIG', e.data, True): | 735 | if data.getVar('GIT_CORE_CONFIG', e.data, True): |
| 734 | gitconfig_path = bb.data.expand("${STAGING_DIR_NATIVE}/usr/etc/gitconfig", e.data) | 736 | gitconfig_path = bb.data.getVar('GIT_CONFIG', e.data, True) |
| 735 | proxy_command = " gitproxy = %s\n" % data.getVar('GIT_PROXY_COMMAND', e.data, True) | 737 | proxy_command = " gitproxy = %s\n" % data.getVar('GIT_PROXY_COMMAND', e.data, True) |
| 736 | 738 | ||
| 737 | bb.mkdirhier(bb.data.expand("${STAGING_DIR_NATIVE}/usr/etc/", e.data)) | 739 | bb.mkdirhier(bb.data.expand("${STAGING_DIR_NATIVE}/usr/etc/", e.data)) |
| @@ -748,10 +750,6 @@ def generate_git_config(e): | |||
| 748 | ignore_host = data.getVar('GIT_PROXY_IGNORE_%s' % ignore_count, e.data, True) | 750 | ignore_host = data.getVar('GIT_PROXY_IGNORE_%s' % ignore_count, e.data, True) |
| 749 | f.write(proxy_command) | 751 | f.write(proxy_command) |
| 750 | f.close | 752 | f.close |
| 751 | if not os.path.exists(os.path.expanduser("~/.gitconfig")): | ||
| 752 | import shutil | ||
| 753 | shutil.copyfile(gitconfig_path, os.path.expanduser("~/.gitconfig")) | ||
| 754 | |||
| 755 | 753 | ||
| 756 | METADATA_REVISION ?= "${@base_get_metadata_monotone_revision(d)}" | 754 | METADATA_REVISION ?= "${@base_get_metadata_monotone_revision(d)}" |
| 757 | 755 | ||
