aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe F. Tonello <eu@felipetonello.com>2016-02-03 16:29:42 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-04 23:47:43 +0000
commit54a3864246f2be0b62761f639a1d5c9407aded4f (patch)
tree0251947cab7c5c6ce007ae4af5f6dc5c6f379ad7
parent2876019e696ff2af164961d5d4c8e3ea9dfefc23 (diff)
downloadbitbake-54a3864246f2be0b62761f639a1d5c9407aded4f.tar.gz
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. Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/gitsm.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
index 0392e48d1..2ecea7c7e 100644
--- a/lib/bb/fetch2/gitsm.py
+++ b/lib/bb/fetch2/gitsm.py
@@ -131,7 +131,7 @@ class GitSM(Git):
os.chdir(ud.destdir)
submodules = self.uses_submodules(ud, d)
if submodules:
- runfetchcmd("cp -r " + ud.clonedir + "/modules " + ud.destdir + "/.git/", d)
+ runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d)
runfetchcmd(ud.basecmd + " submodule init", d)
runfetchcmd(ud.basecmd + " submodule update", d)