From 921cbb2626f0b6acdca4cbe528b9b5fe757bad6a Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 31 Oct 2008 14:38:11 +0000 Subject: base.bbclass: Fix the git config file writing code --- meta/classes/base.bbclass | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'meta/classes/base.bbclass') diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 4ce18f0f0c..a9ad1a0793 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -731,23 +731,24 @@ def generate_git_config(e): from bb import data if data.getVar('GIT_CORE_CONFIG', e.data, True): - gitconfig_path = "${STAGING_DIR_HOST}/usr/etc/gitconfig" - proxy_command = "gitproxy = %s" % data.getVar('GIT_PROXY_COMMAND', e.data, True) + gitconfig_path = bb.data.expand("${STAGING_DIR_NATTIVE}/usr/etc/gitconfig", e.data) + proxy_command = " gitproxy = %s\n" % data.getVar('GIT_PROXY_COMMAND', e.data, True) - bb.mkdirhier("${STAGING_DIR_HOST}/usr/etc/") + bb.mkdirhier(bb.data.expand("${STAGING_DIR_NATTIVE}/usr/etc/", e.data)) if (os.path.exists(gitconfig_path)): os.remove(gitconfig_path) f = open(gitconfig_path, 'w') f.write("[core]\n") - f.write(proxy_command) - ignore_count = 1 - ignore_host = data.getVar('GIT_PROXY_IGNORE_1', e.data, True) + ignore_host = " gitproxy = non for %s" % data.getVar('GIT_PROXY_IGNORE_1', e.data, True) while (ignore_host): f.write(ignore_host) ignore_count += 1 - ignore_host = data.getVar('GIT_PROXY_IGNORE_%s' % ignore_count, e.data, True) + ignore_host = " gitproxy = non for %s\n" % data.getVar('GIT_PROXY_IGNORE_%s' % ignore_count, e.data, True) + f.write(proxy_command) + f.close + METADATA_REVISION ?= "${@base_get_metadata_monotone_revision(d)}" -- cgit v1.2.3-54-g00ecf