mirror of
git://git.yoctoproject.org/poky
synced 2026-08-19 07:00:00 +00:00
bitbake: 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. (Bitbake rev: bc57798ff39cae5ffea194c867e07136f7b6f3ec) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
1ae880e253
commit
e08994ce95
@ -110,8 +110,7 @@ class GitSM(Git):
|
|||||||
os.chdir(tmpclonedir)
|
os.chdir(tmpclonedir)
|
||||||
runfetchcmd(ud.basecmd + " reset --hard", d)
|
runfetchcmd(ud.basecmd + " reset --hard", d)
|
||||||
runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d)
|
runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d)
|
||||||
runfetchcmd(ud.basecmd + " submodule init", d)
|
runfetchcmd(ud.basecmd + " submodule update --init --recursive", d)
|
||||||
runfetchcmd(ud.basecmd + " submodule update", d)
|
|
||||||
self._set_relative_paths(tmpclonedir)
|
self._set_relative_paths(tmpclonedir)
|
||||||
runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*false/bare = true/'", d)
|
runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*false/bare = true/'", d)
|
||||||
os.rename(gitdir, ud.clonedir,)
|
os.rename(gitdir, ud.clonedir,)
|
||||||
@ -132,6 +131,4 @@ class GitSM(Git):
|
|||||||
submodules = self.uses_submodules(ud, d)
|
submodules = self.uses_submodules(ud, d)
|
||||||
if submodules:
|
if submodules:
|
||||||
runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d)
|
runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d)
|
||||||
runfetchcmd(ud.basecmd + " submodule init", d)
|
runfetchcmd(ud.basecmd + " submodule update --init --recursive", d)
|
||||||
runfetchcmd(ud.basecmd + " submodule update", d)
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user