diff options
| -rw-r--r-- | bitbake/lib/bb/fetch2/gitsm.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py index 0699645fbf..488e99cde6 100644 --- a/bitbake/lib/bb/fetch2/gitsm.py +++ b/bitbake/lib/bb/fetch2/gitsm.py | |||
| @@ -144,9 +144,11 @@ class GitSM(Git): | |||
| 144 | # unpacked temporarily so that we can examine the .gitmodules file | 144 | # unpacked temporarily so that we can examine the .gitmodules file |
| 145 | if ud.shallow and os.path.exists(ud.fullshallow) and extra_check: | 145 | if ud.shallow and os.path.exists(ud.fullshallow) and extra_check: |
| 146 | tmpdir = tempfile.mkdtemp(dir=d.getVar("DL_DIR")) | 146 | tmpdir = tempfile.mkdtemp(dir=d.getVar("DL_DIR")) |
| 147 | runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=tmpdir) | 147 | try: |
| 148 | self.process_submodules(ud, tmpdir, subfunc, d) | 148 | runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=tmpdir) |
| 149 | shutil.rmtree(tmpdir) | 149 | self.process_submodules(ud, tmpdir, subfunc, d) |
| 150 | finally: | ||
| 151 | shutil.rmtree(tmpdir) | ||
| 150 | else: | 152 | else: |
| 151 | self.process_submodules(ud, ud.clonedir, subfunc, d) | 153 | self.process_submodules(ud, ud.clonedir, subfunc, d) |
| 152 | 154 | ||
