diff options
| author | Philip Lorenz <philip.lorenz@bmw.de> | 2025-04-29 10:11:23 +0200 |
|---|---|---|
| committer | Paul Barker <paul@pbarker.dev> | 2026-03-25 17:34:13 +0000 |
| commit | d9f03b7c82101ae64aa79a2f9aa44afd7c8ffc4c (patch) | |
| tree | e51eabf1e3438c9f36600252e43e0be6dac1c292 /bitbake | |
| parent | 7945a2ac62c73b43cf1d78ea0fe8f01b067d0403 (diff) | |
| download | poky-d9f03b7c82101ae64aa79a2f9aa44afd7c8ffc4c.tar.gz | |
bitbake: fetch2: Fix LFS object checkout in submodules
Skipping smudging prevents the LFS objects from replacing their
placeholder files when `git submodule update` actually checks out the
target revision in the submodule. Smudging cannot happen earlier as the
clone stored in `.git/modules` is bare.
This should be fine as long as all LFS objects are available in the
download cache (which they are after the other fixes are applied).
(Bitbake rev: d3b4c352dd33fca90cd31649eda054b884478739)
Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d270e33a07c50bb9c08861cf9a6dc51e1fd2d874)
Suggested-by: Michael Siebold <michael.siebold@gmail.com>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Diffstat (limited to 'bitbake')
| -rw-r--r-- | bitbake/lib/bb/fetch2/gitsm.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py index 5c98991480..ef19053330 100644 --- a/bitbake/lib/bb/fetch2/gitsm.py +++ b/bitbake/lib/bb/fetch2/gitsm.py | |||
| @@ -243,12 +243,11 @@ class GitSM(Git): | |||
| 243 | ret = self.process_submodules(ud, ud.destdir, unpack_submodules, d) | 243 | ret = self.process_submodules(ud, ud.destdir, unpack_submodules, d) |
| 244 | 244 | ||
| 245 | if not ud.bareclone and ret: | 245 | if not ud.bareclone and ret: |
| 246 | # All submodules should already be downloaded and configured in the tree. This simply | 246 | cmdprefix = "" |
| 247 | # sets up the configuration and checks out the files. The main project config should | 247 | # Avoid LFS smudging (replacing the LFS pointers with the actual content) when LFS shouldn't be used but git-lfs is installed. |
| 248 | # remain unmodified, and no download from the internet should occur. As such, lfs smudge | 248 | if not self._need_lfs(ud): |
| 249 | # should also be skipped as these files were already smudged in the fetch stage if lfs | 249 | cmdprefix = "GIT_LFS_SKIP_SMUDGE=1 " |
| 250 | # was enabled. | 250 | runfetchcmd("%s%s submodule update --recursive --no-fetch" % (cmdprefix, ud.basecmd), d, quiet=True, workdir=ud.destdir) |
| 251 | runfetchcmd("GIT_LFS_SKIP_SMUDGE=1 %s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir) | ||
| 252 | def clean(self, ud, d): | 251 | def clean(self, ud, d): |
| 253 | def clean_submodule(ud, url, module, modpath, workdir, d): | 252 | def clean_submodule(ud, url, module, modpath, workdir, d): |
| 254 | url += ";bareclone=1;nobranch=1" | 253 | url += ";bareclone=1;nobranch=1" |
