diff options
author | Randolph Sapp <rs@ti.com> | 2023-08-18 19:10:11 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-30 10:41:54 +0100 |
commit | 264e5fef9e8e15d2fca02b392ea1331c55ceea7c (patch) | |
tree | a5c46ba3c113a415b5aac48db20b8cd1b971fca9 /bitbake/lib | |
parent | c9843dfd1c3b4659769e23c1703c82a89562c6e1 (diff) | |
download | poky-264e5fef9e8e15d2fca02b392ea1331c55ceea7c.tar.gz |
bitbake: gitsm: tolerate git-lfs in submodules
Explicitly pass down the lfs parameter from the source repo URI to
submodules. Add smudge skip to final checkout phase to make sure we
don't access the network here. Everything should have been fetched and
setup from the lfs logic in the git fetcher at this point.
(Bitbake rev: 1f8f21fe024b391d3a6670c64b839db0eee083c3)
Signed-off-by: Randolph Sapp <rs@ti.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch2/gitsm.py | 11 |
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 |