summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/gitsm.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/gitsm.py')
-rw-r--r--bitbake/lib/bb/fetch2/gitsm.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index 17aac6357c..fab4b1164c 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -152,9 +152,11 @@ class GitSM(Git):
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 if ud.shallow and os.path.exists(ud.fullshallow) and extra_check:
154 tmpdir = tempfile.mkdtemp(dir=d.getVar("DL_DIR")) 154 tmpdir = tempfile.mkdtemp(dir=d.getVar("DL_DIR"))
155 runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=tmpdir) 155 try:
156 self.process_submodules(ud, tmpdir, subfunc, d) 156 runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=tmpdir)
157 shutil.rmtree(tmpdir) 157 self.process_submodules(ud, tmpdir, subfunc, d)
158 finally:
159 shutil.rmtree(tmpdir)
158 else: 160 else:
159 self.process_submodules(ud, ud.clonedir, subfunc, d) 161 self.process_submodules(ud, ud.clonedir, subfunc, d)
160 162