[bitbake-devel] [PATCHv2] fetch2/gitsm: copy submodules from DL_DIR in unpack
Christopher Larson
chris_larson at mentor.com
Mon Aug 21 16:57:56 UTC 2017
Supercedes "[PATCH 2/2] Revert "fetch2/gitsm: Fix when repository change
submodules””.
On Mon, Aug 21, 2017 at 9:57 AM, Christopher Larson <kergoth at gmail.com>
wrote:
> From: Christopher Larson <chris_larson at mentor.com>
>
> Revert "fetch2/gitsm: Fix when repository change submodules"
>
> This reverts commit 12f6c0651af8bd5d6efb751690571cf2fcd3eeb0.
>
> This commit caused the gitsm fetcher to download submodules from upstream
> in
> do_unpack, rather than using the previously fetched submodules from DL_DIR.
> Also drop the pointless checkout, as Git.unpack() already handles this
> correctly.
>
> [YOCTO #11830]
>
> Signed-off-by: Christopher Larson <chris_larson at mentor.com>
> ---
> lib/bb/fetch2/gitsm.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
> index 0aff1008..ed94c3d7 100644
> --- a/lib/bb/fetch2/gitsm.py
> +++ b/lib/bb/fetch2/gitsm.py
> @@ -131,5 +131,6 @@ class GitSM(Git):
> Git.unpack(self, ud, destdir, d)
>
> if self.uses_submodules(ud, d, ud.destdir):
> - runfetchcmd(ud.basecmd + " checkout " +
> ud.revisions[ud.names[0]], d, workdir=ud.destdir)
> + if not ud.shallow or ud.localpath != ud.fullshallow:
> + runfetchcmd('cp -fpPRH "%s/modules" "%s/"' %
> (ud.clonedir, os.path.join(ud.destdir, '.git')), d)
> runfetchcmd(ud.basecmd + " submodule update --init
> --recursive", d, workdir=ud.destdir)
> --
> 2.11.1
>
>
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20170821/e5afb19a/attachment-0002.html>
More information about the bitbake-devel
mailing list