<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 6, 2015 at 8:47 AM, Felipe Tonello <span dir="ltr"><<a href="mailto:eu@felipetonello.com" target="_blank">eu@felipetonello.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jul 6, 2015 at 4:38 PM, Christopher Larson <<a href="mailto:clarson@kergoth.com">clarson@kergoth.com</a>> wrote:<br>
> On Mon, Jul 6, 2015 at 8:13 AM, <<a href="mailto:eu@felipetonello.com">eu@felipetonello.com</a>> wrote:<br>
>><br>
>> From: "Felipe F. Tonello" <<a href="mailto:eu@felipetonello.com">eu@felipetonello.com</a>><br>
>><br>
>> Only do git submodule update after upack, otherwise the branch and commit<br>
>> id<br>
>> will be ignored, causing to run git submodules on a wrong ref.<br>
>><br>
>> Since .gitmodules file is used to check if there is any submodule, we<br>
>> don't<br>
>> need to worry about copying .git/modules directory into the unpacked<br>
>> source<br>
>> tree.<br>
>><br>
>> Signed-off-by: Felipe F. Tonello <<a href="mailto:eu@felipetonello.com">eu@felipetonello.com</a>><br>
><br>
><br>
> We don’t want to be downloading from remote locations in do_unpack, only<br>
> do_fetch. This patch will result in the opposite, which means the submodule<br>
> sources won’t be included in the git mirror tarball, and it’ll be impossible<br>
> to build with BB_NO_NETWORK=1. Also -c fetchall won’t result in all sources<br>
> having been fetched, which defeats its purpose.<br>
<br>
</span>I understand. So Ideally we want to checkout to the right ref before<br>
doing the git submodule init && update? Because the way it is today it<br>
doesn't work if the .gitmodules is in a different branch rather then<br>
the default.<br>
<br>
The git submodule init && update was previously in the unpack()<br>
anyway. Should I remove it?</blockquote></div><br>The init will set up .git/config, and the update will check out the modules into their appropriate locations in the source tree, so afaik they’re still needed to do that, even though they’re already fetched in .git/modules.<br>-- <br><div class="gmail_signature">Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div>
</div></div>