mirror of
git://git.yoctoproject.org/poky
synced 2026-04-02 02:49:11 +00:00
bitbake: gitsm: Add clean function
Fixed: $ bitbake utfcpp -cfetch && bitbake utfcpp -ccleanall The downloads/git2/github.com.nemtrif.ftest won't be cleaned without this fix. (Bitbake rev: 6cb07e8c702b750c5047dcd646ca72ca5f75321c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 79f25fc5c1b8d0e08540f4aa07875309f5325f47) 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>
This commit is contained in:
parent
f31b671502
commit
3b3748d9c5
@ -249,6 +249,19 @@ class GitSM(Git):
|
|||||||
# should also be skipped as these files were already smudged in the fetch stage if lfs
|
# should also be skipped as these files were already smudged in the fetch stage if lfs
|
||||||
# was enabled.
|
# was enabled.
|
||||||
runfetchcmd("GIT_LFS_SKIP_SMUDGE=1 %s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir)
|
runfetchcmd("GIT_LFS_SKIP_SMUDGE=1 %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"
|
||||||
|
try:
|
||||||
|
newfetch = Fetch([url], d, cache=False)
|
||||||
|
newfetch.clean()
|
||||||
|
except Exception as e:
|
||||||
|
logger.warning('gitsm: submodule clean failed: %s %s' % (type(e).__name__, str(e)))
|
||||||
|
|
||||||
|
self.call_process_submodules(ud, d, True, clean_submodule)
|
||||||
|
|
||||||
|
# Clean top git dir
|
||||||
|
Git.clean(self, ud, d)
|
||||||
|
|
||||||
def implicit_urldata(self, ud, d):
|
def implicit_urldata(self, ud, d):
|
||||||
import shutil, subprocess, tempfile
|
import shutil, subprocess, tempfile
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user