<div dir="ltr">On Wed, Sep 6, 2017 at 5:33 AM, Mikko Rapeli <span dir="ltr">&lt;<a href="mailto:mikko.rapeli@bmw.de" target="_blank">mikko.rapeli@bmw.de</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="gmail-">Currently download caches for recipes using gitsm are filled also with<br>
the submodule repositories but when the git submodule tree is reused from<br>
cache, only the base repository is cloned. After a source URL rewrite,<br>
&#39;git submodule update --init --recursive&#39; is called in the tree<br>
which downloads the needed submodules from upstream URL&#39;s.<br>
This wastes bandwidth since download cache already had the needed<br>
commits for the submodule repositories.<br>
<br>
With this change, also the submodule repositories are copied to the<br>
work space from download cache and the download from upstream can<br>
be avoided. Using plain &#39;cp -a&#39; since git cloning doesn&#39;t work for the<br>
submodule directories.<br></span></blockquote><div><br></div><div>This behavior is both already tracked by a yocto bug, and blindly copying will result in breakage when the branch changes in such a way that the submodules change. I already submitted an equivalent patch a week or two ago and then decided against its inclusion, as it just runs into other failures, specifically there was an oe-selftest that fails if you had previously fetched a different branch of the sources in question, as the upstream url of one of the submodules changes between branches, and we don’t re-fetch existing submodules when their urls change. We definitely need to fix this, but this fixes one problem and introduces others.</div><div><br></div><div>See <a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=11830">https://bugzilla.yoctoproject.org/show_bug.cgi?id=11830</a> and <a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=11831">https://bugzilla.yoctoproject.org/show_bug.cgi?id=11831</a> for reference.</div></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">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>