summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/gitsm.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index bab1bf2580..1c58230eac 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -150,7 +150,10 @@ class GitSM(Git):
150 def call_process_submodules(self, ud, d, extra_check, subfunc): 150 def call_process_submodules(self, ud, d, extra_check, subfunc):
151 # If we're using a shallow mirror tarball it needs to be 151 # If we're using a shallow mirror tarball it needs to be
152 # unpacked temporarily so that we can examine the .gitmodules file 152 # unpacked temporarily so that we can examine the .gitmodules file
153 if ud.shallow and os.path.exists(ud.fullshallow) and extra_check: 153 # Unpack even when ud.clonedir is not available,
154 # which may occur during a fast shallow clone
155 unpack = extra_check or not os.path.exists(ud.clonedir)
156 if ud.shallow and os.path.exists(ud.fullshallow) and unpack:
154 tmpdir = tempfile.mkdtemp(dir=d.getVar("DL_DIR")) 157 tmpdir = tempfile.mkdtemp(dir=d.getVar("DL_DIR"))
155 try: 158 try:
156 runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=tmpdir) 159 runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=tmpdir)