<div dir="ltr">Supercedes "[PATCH 2/2] Revert "fetch2/gitsm: Fix when repository change submodules””.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 21, 2017 at 9:57 AM, Christopher Larson <span dir="ltr"><<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
<br>
Revert "fetch2/gitsm: Fix when repository change submodules"<br>
<br>
This reverts commit 12f6c0651af8bd5d6efb751690571c<wbr>f2fcd3eeb0.<br>
<br>
This commit caused the gitsm fetcher to download submodules from upstream in<br>
do_unpack, rather than using the previously fetched submodules from DL_DIR.<br>
Also drop the pointless checkout, as Git.unpack() already handles this<br>
correctly.<br>
<br>
[YOCTO #11830]<br>
<br>
Signed-off-by: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
---<br>
lib/bb/fetch2/gitsm.py | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py<br>
index 0aff1008..ed94c3d7 100644<br>
--- a/lib/bb/fetch2/gitsm.py<br>
+++ b/lib/bb/fetch2/gitsm.py<br>
@@ -131,5 +131,6 @@ class GitSM(Git):<br>
Git.unpack(self, ud, destdir, d)<br>
<br>
if self.uses_submodules(ud, d, ud.destdir):<br>
- runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d, workdir=ud.destdir)<br>
+ if not ud.shallow or ud.localpath != ud.fullshallow:<br>
+ runfetchcmd('cp -fpPRH "%s/modules" "%s/"' % (ud.clonedir, os.path.join(ud.destdir, '.git')), d)<br>
runfetchcmd(ud.basecmd + " submodule update --init --recursive", d, workdir=ud.destdir)<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.11.1<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Senior Software Engineer, Mentor Graphics</div></div></div></div></div></div></div>
</div>