[OE-core] [PATCH] fetch2/gitsm: Unpack shallow mirror tarballs
Paul Barker
pbarker at konsulko.com
Mon Feb 24 20:15:17 UTC 2020
On Mon, 24 Feb 2020 at 20:14, Paul Barker <pbarker at konsulko.com> wrote:
>
> When a shallow mirror tarball is used to satisfy a gitsm URI it needs to
> be unpacked so that the .gitmodules file can be examined.
>
> Signed-off-by: Paul Barker <pbarker at konsulko.com>
> ---
> lib/bb/fetch2/gitsm.py | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
> index aa121cbe..98f5dae5 100644
> --- a/lib/bb/fetch2/gitsm.py
> +++ b/lib/bb/fetch2/gitsm.py
> @@ -169,6 +169,12 @@ class GitSM(Git):
> raise
>
> Git.download(self, ud, d)
> +
> + # If we're using a shallow mirror tarball it needs to be unpacked so
> + # that we can examine the .gitmodules file
> + if ud.shallow and os.path.exists(ud.fullshallow) and Git.need_update(self, ud, d):
> + bb.utils.mkdirhier(ud.clonedir)
> + runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=ud.clonedir)
> self.process_submodules(ud, ud.clonedir, download_submodule, d)
>
> def unpack(self, ud, destdir, d):
> --
> 2.20.1
>
I realised the moment I hit send that I got the wrong mailing list...
More information about the Openembedded-core
mailing list