summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass10
1 files changed, 4 insertions, 6 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index f3587bcbef..1f7602394e 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -14,7 +14,7 @@ OE_IMPORTS += "os sys time oe.path oe.utils oe.data oe.packagegroup oe.sstatesig
14OE_IMPORTS[type] = "list" 14OE_IMPORTS[type] = "list"
15 15
16def oe_import(d): 16def oe_import(d):
17 import os, sys 17 import sys
18 18
19 bbpath = d.getVar("BBPATH", True).split(":") 19 bbpath = d.getVar("BBPATH", True).split(":")
20 sys.path[0:0] = [os.path.join(dir, "lib") for dir in bbpath] 20 sys.path[0:0] = [os.path.join(dir, "lib") for dir in bbpath]
@@ -117,11 +117,9 @@ GIT_CONFIG_PATH = "${STAGING_DIR_NATIVE}/etc"
117GIT_CONFIG = "${GIT_CONFIG_PATH}/gitconfig" 117GIT_CONFIG = "${GIT_CONFIG_PATH}/gitconfig"
118 118
119def generate_git_config(e): 119def generate_git_config(e):
120 from bb import data 120 if e.data.getVar('GIT_CORE_CONFIG', True):
121
122 if data.getVar('GIT_CORE_CONFIG', e.data, True):
123 gitconfig_path = e.data.getVar('GIT_CONFIG', True) 121 gitconfig_path = e.data.getVar('GIT_CONFIG', True)
124 proxy_command = " gitProxy = %s\n" % data.getVar('OE_GIT_PROXY_COMMAND', e.data, True) 122 proxy_command = " gitProxy = %s\n" % e.data.getVar('OE_GIT_PROXY_COMMAND', True)
125 123
126 bb.mkdirhier(e.data.expand("${GIT_CONFIG_PATH}")) 124 bb.mkdirhier(e.data.expand("${GIT_CONFIG_PATH}"))
127 if (os.path.exists(gitconfig_path)): 125 if (os.path.exists(gitconfig_path)):
@@ -129,7 +127,7 @@ def generate_git_config(e):
129 127
130 f = open(gitconfig_path, 'w') 128 f = open(gitconfig_path, 'w')
131 f.write("[core]\n") 129 f.write("[core]\n")
132 ignore_hosts = data.getVar('GIT_PROXY_IGNORE', e.data, True).split() 130 ignore_hosts = e.data.getVar('GIT_PROXY_IGNORE', True).split()
133 for ignore_host in ignore_hosts: 131 for ignore_host in ignore_hosts:
134 f.write(" gitProxy = none for %s\n" % ignore_host) 132 f.write(" gitProxy = none for %s\n" % ignore_host)
135 f.write(proxy_command) 133 f.write(proxy_command)