diff options
| author | Stefan Koch <stefan-koch@siemens.com> | 2025-03-03 14:49:11 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-06 11:16:46 +0000 |
| commit | 22728acd78d65e993215a7f94cbf692d3111a4c4 (patch) | |
| tree | cf477a921825c0154ede4dcb972dce7809c1a48f /bitbake/lib/bb/fetch2 | |
| parent | 539b012013aca663d8c239b17384df2a271431e6 (diff) | |
| download | poky-22728acd78d65e993215a7f94cbf692d3111a4c4.tar.gz | |
bitbake: fetch2/gitsm: Unpack even when `ud.clonedir` is not available
(Bitbake rev: 13d76361ec37faecd84e7b81da22ada7d4e0ba90)
Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
| -rw-r--r-- | bitbake/lib/bb/fetch2/gitsm.py | 5 |
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) |
