summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/gitsm.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index fab4b1164c..ba62517f08 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -249,6 +249,19 @@ class GitSM(Git):
249 # should also be skipped as these files were already smudged in the fetch stage if lfs 249 # should also be skipped as these files were already smudged in the fetch stage if lfs
250 # was enabled. 250 # was enabled.
251 runfetchcmd("GIT_LFS_SKIP_SMUDGE=1 %s submodule update --recursive --no-fetch" % (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):
253 def clean_submodule(ud, url, module, modpath, workdir, d):
254 url += ";bareclone=1;nobranch=1"
255 try:
256 newfetch = Fetch([url], d, cache=False)
257 newfetch.clean()
258 except Exception as e:
259 logger.warning('gitsm: submodule clean failed: %s %s' % (type(e).__name__, str(e)))
260
261 self.call_process_submodules(ud, d, True, clean_submodule)
262
263 # Clean top git dir
264 Git.clean(self, ud, d)
252 265
253 def implicit_urldata(self, ud, d): 266 def implicit_urldata(self, ud, d):
254 import shutil, subprocess, tempfile 267 import shutil, subprocess, tempfile