bitbake: fetch2/gitsm: Fix fetch when the repository contains nested submodules
PATCH 1/1 bitbake: fetch2/gitsm: Fix fetch when the repository contains nested submodules
This fixes a problem when the repository contains multiple levels of submodules via a resursive submodule init.
Signed-off-by Derek Straka <[email protected]>
--- bitbake/lib/bb/fetch2/gitsm.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
bitbake/lib/bb/fetch2/gitsm.py +2 -5
@@ -110,8 +110,7 @@ class GitSM(Git): os.chdir(tmpclonedir) runfetchcmd(ud.basecmd + " reset --hard", d) runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d) - runfetchcmd(ud.basecmd + " submodule init", d) - runfetchcmd(ud.basecmd + " submodule update", d) + runfetchcmd(ud.basecmd + " submodule update --init --recursive", d) self._set_relative_paths(tmpclonedir) runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*false/bare = true/'", d) os.rename(gitdir, ud.clonedir,)
@@ -132,6 +131,4 @@ class GitSM(Git): submodules = self.uses_submodules(ud, d) if submodules: runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d) - runfetchcmd(ud.basecmd + " submodule init", d) - runfetchcmd(ud.basecmd + " submodule update", d) - + runfetchcmd(ud.basecmd + " submodule update --init --recursive", d)
Signature · 1 line
1.9.1