summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index d818c1e6f0..08daa20313 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -124,12 +124,14 @@ class Git(Fetch):
124 124
125 # If the repo still doesn't exist, fallback to cloning it 125 # If the repo still doesn't exist, fallback to cloning it
126 if not os.path.exists(ud.clonedir): 126 if not os.path.exists(ud.clonedir):
127 bb.fetch2.check_network_access(d, "git clone %s%s" % (ud.host, ud.path))
127 runfetchcmd("%s clone -n %s://%s%s%s %s" % (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.clonedir), d) 128 runfetchcmd("%s clone -n %s://%s%s%s %s" % (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.clonedir), d)
128 129
129 os.chdir(ud.clonedir) 130 os.chdir(ud.clonedir)
130 # Update the checkout if needed 131 # Update the checkout if needed
131 if not self._contains_ref(ud.tag, d) or 'fullclone' in ud.parm: 132 if not self._contains_ref(ud.tag, d) or 'fullclone' in ud.parm:
132 # Remove all but the .git directory 133 # Remove all but the .git directory
134 bb.fetch2.check_network_access(d, "git fetch %s%s" %(ud.host, ud.path))
133 runfetchcmd("rm * -Rf", d) 135 runfetchcmd("rm * -Rf", d)
134 if 'fullclone' in ud.parm: 136 if 'fullclone' in ud.parm:
135 runfetchcmd("%s fetch --all" % (ud.basecmd), d) 137 runfetchcmd("%s fetch --all" % (ud.basecmd), d)
@@ -215,6 +217,7 @@ class Git(Fetch):
215 else: 217 else:
216 username = "" 218 username = ""
217 219
220 bb.fetch2.check_network_access(d, "git ls-remote %s%s %s" % (ud.host, ud.path, ud.branch))
218 basecmd = data.getVar("FETCHCMD_git", d, True) or "git" 221 basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
219 cmd = "%s ls-remote %s://%s%s%s %s" % (basecmd, ud.proto, username, ud.host, ud.path, ud.branch) 222 cmd = "%s ls-remote %s://%s%s%s %s" % (basecmd, ud.proto, username, ud.host, ud.path, ud.branch)
220 output = runfetchcmd(cmd, d, True) 223 output = runfetchcmd(cmd, d, True)