[bitbake-devel] [PATCH] fetch2: Remove unecessary code for git submodules

Christopher Larson clarson at kergoth.com
Mon Jul 6 15:50:01 UTC 2015


On Mon, Jul 6, 2015 at 8:47 AM, Felipe Tonello <eu at felipetonello.com> wrote:

> On Mon, Jul 6, 2015 at 4:38 PM, Christopher Larson <clarson at kergoth.com>
> wrote:
> > On Mon, Jul 6, 2015 at 8:13 AM, <eu at felipetonello.com> wrote:
> >>
> >> From: "Felipe F. Tonello" <eu at felipetonello.com>
> >>
> >> Only do git submodule update after upack, otherwise the branch and
> commit
> >> id
> >> will be ignored, causing to run git submodules on a wrong ref.
> >>
> >> Since .gitmodules file is used to check if there is any submodule, we
> >> don't
> >> need to worry about copying .git/modules directory into the unpacked
> >> source
> >> tree.
> >>
> >> Signed-off-by: Felipe F. Tonello <eu at felipetonello.com>
> >
> >
> > We don’t want to be downloading from remote locations in do_unpack, only
> > do_fetch. This patch will result in the opposite, which means the
> submodule
> > sources won’t be included in the git mirror tarball, and it’ll be
> impossible
> > to build with BB_NO_NETWORK=1. Also -c fetchall won’t result in all
> sources
> > having been fetched, which defeats its purpose.
>
> I understand. So Ideally we want to checkout to the right ref before
> doing the git submodule init && update? Because the way it is today it
> doesn't work if the .gitmodules is in a different branch rather then
> the default.
>
> The git submodule init && update was previously in the unpack()
> anyway. Should I remove it?


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.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20150706/6f4770be/attachment-0002.html>


More information about the bitbake-devel mailing list