diff mbox series

[7/8] fetch2: Fix LFS object checkout in submodules

Message ID 20250423151901.1300944-8-philip.lorenz@bmw.de
State New
Headers show
Series Fix gitsm LFS support | expand

Commit Message

Philip Lorenz April 23, 2025, 3:19 p.m. UTC
Skipping smudging prevents the LFS objects from replacing their
placeholder files when `git submodule update` actually clones the
submodules into the repository (from the local download cache). Drop
`GIT_LFS_SKIP_SMUDGE=1` to fix this.

As long as all LFS objects are available in the download cache (which
they are after the other fixes are applied) the network will not be
accessed anyhow.

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
---
 lib/bb/fetch2/gitsm.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
index aeeb3cf63..36e760e63 100644
--- a/lib/bb/fetch2/gitsm.py
+++ b/lib/bb/fetch2/gitsm.py
@@ -245,12 +245,7 @@  class GitSM(Git):
         ret = self.process_submodules(ud, ud.destdir, unpack_submodules, d)
 
         if not ud.bareclone and ret:
-            # All submodules should already be downloaded and configured in the tree.  This simply
-            # sets up the configuration and checks out the files.  The main project config should
-            # remain unmodified, and no download from the internet should occur. As such, lfs smudge
-            # should also be skipped as these files were already smudged in the fetch stage if lfs
-            # was enabled.
-            runfetchcmd("GIT_LFS_SKIP_SMUDGE=1 %s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir)
+            runfetchcmd("%s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir)
     def clean(self, ud, d):
         def clean_submodule(ud, url, module, modpath, workdir, d):
             url += ";bareclone=1;nobranch=1"