From d1dae30b7932c2e6c6829a04b19a7f9e440cdd5c Mon Sep 17 00:00:00 2001 From: Peter Marko Date: Fri, 4 Apr 2025 20:59:10 +0200 Subject: bitbake: fetch/git: always fetch lfs when creating shallow tarball Before fast shallow tarballs the shallow tarball with lfs worked only if the original .../downloads/git2/... directory existed. Once it was not there, do_unpack on shallow tarball without lfs files failed due to disabled network. It was fixed for fast shallow tarballs and this commit fixes the other scenarios, too. This can happen when such shallow tarball is put to mirror or if someone does cleanup to reclaim disk space. (Bitbake rev: 4e6fb31a88448cdacf4e9f84cf0a8a8035f84d63) Signed-off-by: Peter Marko Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb/fetch2/git.py') diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 5f4ec6128c..587a16994a 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -634,9 +634,8 @@ class Git(FetchMethod): runfetchcmd(fetch_cmd, d, workdir=dest) runfetchcmd("%s update-ref %s %s" % (ud.basecmd, ref, revision), d, workdir=dest) - # Fetch Git LFS data for fast shallow clones - if not ud.shallow_skip_fast: - self.lfs_fetch(ud, d, dest, ud.revision) + # Fetch Git LFS data + self.lfs_fetch(ud, d, dest, ud.revision) # Apply extra ref wildcards all_refs_remote = runfetchcmd("%s ls-remote origin 'refs/*'" % ud.basecmd, \ -- cgit v1.2.3-54-g00ecf