summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorStefan Koch <stefan-koch@siemens.com>2025-03-03 14:49:11 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-06 11:16:46 +0000
commit22728acd78d65e993215a7f94cbf692d3111a4c4 (patch)
treecf477a921825c0154ede4dcb972dce7809c1a48f /bitbake/lib/bb/fetch2
parent539b012013aca663d8c239b17384df2a271431e6 (diff)
downloadpoky-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.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)