summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/gitsm.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index 47225b9721..a87361ccf3 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -123,6 +123,7 @@ class GitSM(Git):
123 url += ";name=%s" % module 123 url += ";name=%s" % module
124 url += ";subpath=%s" % module 124 url += ";subpath=%s" % module
125 url += ";nobranch=1" 125 url += ";nobranch=1"
126 url += ";lfs=%s" % self._need_lfs(ud)
126 # Note that adding "user=" here to give credentials to the 127 # Note that adding "user=" here to give credentials to the
127 # submodule is not supported. Since using SRC_URI to give git:// 128 # submodule is not supported. Since using SRC_URI to give git://
128 # URL a password is not supported, one have to use one of the 129 # URL a password is not supported, one have to use one of the
@@ -242,10 +243,12 @@ class GitSM(Git):
242 ret = self.process_submodules(ud, ud.destdir, unpack_submodules, d) 243 ret = self.process_submodules(ud, ud.destdir, unpack_submodules, d)
243 244
244 if not ud.bareclone and ret: 245 if not ud.bareclone and ret:
245 # All submodules should already be downloaded and configured in the tree. This simply sets 246 # All submodules should already be downloaded and configured in the tree. This simply
246 # up the configuration and checks out the files. The main project config should remain 247 # sets up the configuration and checks out the files. The main project config should
247 # unmodified, and no download from the internet should occur. 248 # remain unmodified, and no download from the internet should occur. As such, lfs smudge
248 runfetchcmd("%s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir) 249 # should also be skipped as these files were already smudged in the fetch stage if lfs
250 # was enabled.
251 runfetchcmd("GIT_LFS_SKIP_SMUDGE=1 %s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir)
249 252
250 def implicit_urldata(self, ud, d): 253 def implicit_urldata(self, ud, d):
251 import shutil, subprocess, tempfile 254 import shutil, subprocess, tempfile