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 784f19ecc..e6b2851b9 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): # rather than host provided # Also include some other variables. # FIXME: Should really include all export varaiables? - exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'http_proxy', 'ftp_proxy'] + exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'GIT_CONFIG', 'http_proxy', 'ftp_proxy'] for var in exportvars: val = data.getVar(var, d, True) diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 784f19ecc..e6b2851b9 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): # rather than host provided # Also include some other variables. # FIXME: Should really include all export varaiables? - exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'http_proxy', 'ftp_proxy'] + exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'GIT_CONFIG', 'http_proxy', 'ftp_proxy'] for var in exportvars: val = data.getVar(var, d, True) diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 9c8cdd8d1..1b70bfdd5 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -725,13 +725,15 @@ def base_get_metadata_svn_revision(d): pass return revision +GIT_CONFIG = "${STAGING_DIR_NATIVE}/usr/etc/gitconfig" + def generate_git_config(e): import bb import os from bb import data if data.getVar('GIT_CORE_CONFIG', e.data, True): - gitconfig_path = bb.data.expand("${STAGING_DIR_NATIVE}/usr/etc/gitconfig", e.data) + gitconfig_path = bb.data.getVar('GIT_CONFIG', e.data, True) proxy_command = " gitproxy = %s\n" % data.getVar('GIT_PROXY_COMMAND', e.data, True) bb.mkdirhier(bb.data.expand("${STAGING_DIR_NATIVE}/usr/etc/", e.data)) @@ -748,10 +750,6 @@ def generate_git_config(e): ignore_host = data.getVar('GIT_PROXY_IGNORE_%s' % ignore_count, e.data, True) f.write(proxy_command) f.close - if not os.path.exists(os.path.expanduser("~/.gitconfig")): - import shutil - shutil.copyfile(gitconfig_path, os.path.expanduser("~/.gitconfig")) - METADATA_REVISION ?= "${@base_get_metadata_monotone_revision(d)}" |