From 1ae880e253dc6fd9970e9d7c8ebb790912dc8932 Mon Sep 17 00:00:00 2001 From: "Felipe F. Tonello" Date: Wed, 3 Feb 2016 16:29:42 +0000 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/gitsm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py index 0392e48d1a..2ecea7c7ed 100644 --- a/bitbake/lib/bb/fetch2/gitsm.py +++ b/bitbake/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) -- cgit v1.2.3-54-g00ecf