summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe F. Tonello <eu@felipetonello.com>2016-02-03 16:29:42 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-12 17:46:35 (GMT)
commit1ae880e253dc6fd9970e9d7c8ebb790912dc8932 (patch)
treef26f8d42a2cf48344bb93af4fbbc927c5e1db912
parentadb34b8ddcd8cc34ae7d2b1b2e4b4d291d790f56 (diff)
downloadpoky-1ae880e253dc6fd9970e9d7c8ebb790912dc8932.tar.gz
bitbake: fetch2/gitsm: Fix when repository change submodules
This fix a problem when checking out a commit that changes the submodules previously checkout. Example: Recipe uses branch A and then it updates to use branch B, but branch B has different submodules dependencies then what branch A previously had. (Bitbake rev: 12f6c0651af8bd5d6efb751690571cf2fcd3eeb0) Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/gitsm.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index 0392e48..2ecea7c 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -131,7 +131,7 @@ class GitSM(Git):
131 os.chdir(ud.destdir) 131 os.chdir(ud.destdir)
132 submodules = self.uses_submodules(ud, d) 132 submodules = self.uses_submodules(ud, d)
133 if submodules: 133 if submodules:
134 runfetchcmd("cp -r " + ud.clonedir + "/modules " + ud.destdir + "/.git/", d) 134 runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d)
135 runfetchcmd(ud.basecmd + " submodule init", d) 135 runfetchcmd(ud.basecmd + " submodule init", d)
136 runfetchcmd(ud.basecmd + " submodule update", d) 136 runfetchcmd(ud.basecmd + " submodule update", d)
137 137