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.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 23f8c0da8f..07b3d9a7ff 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -353,10 +353,15 @@ class Git(FetchMethod):
353 if ud.shallow and os.path.exists(ud.fullshallow) and self.need_update(ud, d): 353 if ud.shallow and os.path.exists(ud.fullshallow) and self.need_update(ud, d):
354 ud.localpath = ud.fullshallow 354 ud.localpath = ud.fullshallow
355 return 355 return
356 elif os.path.exists(ud.fullmirror) and not os.path.exists(ud.clonedir): 356 elif os.path.exists(ud.fullmirror) and self.need_update(ud, d):
357 bb.utils.mkdirhier(ud.clonedir) 357 if not os.path.exists(ud.clonedir):
358 runfetchcmd("tar -xzf %s" % ud.fullmirror, d, workdir=ud.clonedir) 358 bb.utils.mkdirhier(ud.clonedir)
359 359 runfetchcmd("tar -xzf %s" % ud.fullmirror, d, workdir=ud.clonedir)
360 else:
361 tmpdir = tempfile.mkdtemp(dir=d.getVar('DL_DIR'))
362 runfetchcmd("tar -xzf %s" % ud.fullmirror, d, workdir=tmpdir)
363 fetch_cmd = "LANG=C %s fetch -f --progress %s " % (ud.basecmd, shlex.quote(tmpdir))
364 runfetchcmd(fetch_cmd, d, workdir=ud.clonedir)
360 repourl = self._get_repo_url(ud) 365 repourl = self._get_repo_url(ud)
361 366
362 # If the repo still doesn't exist, fallback to cloning it 367 # If the repo still doesn't exist, fallback to cloning it