summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorDerek Straka <derek@asterius.io>2016-03-24 08:08:35 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-26 07:34:58 +0000
commitfda94f4e2daada949423cd88240dc0c52b48498d (patch)
tree148a49d63abf04d7f7ff68b30789861abbf6622f /bitbake
parent1341c1744be50bcd05272f5db06fe27c5d6a8aba (diff)
downloadpoky-fda94f4e2daada949423cd88240dc0c52b48498d.tar.gz
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: dbafbe229360ffe5908b106a9c10e274712b9b17) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/gitsm.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index 2ecea7c7ed..752f1d3c15 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -110,8 +110,7 @@ class GitSM(Git):
110 os.chdir(tmpclonedir) 110 os.chdir(tmpclonedir)
111 runfetchcmd(ud.basecmd + " reset --hard", d) 111 runfetchcmd(ud.basecmd + " reset --hard", d)
112 runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d) 112 runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d)
113 runfetchcmd(ud.basecmd + " submodule init", d) 113 runfetchcmd(ud.basecmd + " submodule update --init --recursive", d)
114 runfetchcmd(ud.basecmd + " submodule update", d)
115 self._set_relative_paths(tmpclonedir) 114 self._set_relative_paths(tmpclonedir)
116 runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*false/bare = true/'", d) 115 runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*false/bare = true/'", d)
117 os.rename(gitdir, ud.clonedir,) 116 os.rename(gitdir, ud.clonedir,)
@@ -132,6 +131,4 @@ class GitSM(Git):
132 submodules = self.uses_submodules(ud, d) 131 submodules = self.uses_submodules(ud, d)
133 if submodules: 132 if submodules:
134 runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d) 133 runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d)
135 runfetchcmd(ud.basecmd + " submodule init", d) 134 runfetchcmd(ud.basecmd + " submodule update --init --recursive", d)
136 runfetchcmd(ud.basecmd + " submodule update", d)
137