diff options
author | Peter Marko <peter.marko@siemens.com> | 2025-04-04 20:59:10 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-04-10 11:07:38 +0100 |
commit | d1dae30b7932c2e6c6829a04b19a7f9e440cdd5c (patch) | |
tree | 123ffe45cdf8ddea301b3e8ea05772d8c00cbcf9 /bitbake/lib/bb/fetch2/git.py | |
parent | 1def15acc208040469e95349689ada0420326695 (diff) | |
download | poky-d1dae30b7932c2e6c6829a04b19a7f9e440cdd5c.tar.gz |
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 <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 5 |
1 files changed, 2 insertions, 3 deletions
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): | |||
634 | 634 | ||
635 | runfetchcmd(fetch_cmd, d, workdir=dest) | 635 | runfetchcmd(fetch_cmd, d, workdir=dest) |
636 | runfetchcmd("%s update-ref %s %s" % (ud.basecmd, ref, revision), d, workdir=dest) | 636 | runfetchcmd("%s update-ref %s %s" % (ud.basecmd, ref, revision), d, workdir=dest) |
637 | # Fetch Git LFS data for fast shallow clones | 637 | # Fetch Git LFS data |
638 | if not ud.shallow_skip_fast: | 638 | self.lfs_fetch(ud, d, dest, ud.revision) |
639 | self.lfs_fetch(ud, d, dest, ud.revision) | ||
640 | 639 | ||
641 | # Apply extra ref wildcards | 640 | # Apply extra ref wildcards |
642 | all_refs_remote = runfetchcmd("%s ls-remote origin 'refs/*'" % ud.basecmd, \ | 641 | all_refs_remote = runfetchcmd("%s ls-remote origin 'refs/*'" % ud.basecmd, \ |