[bitbake-devel] [PATCH] fetch2/gitsm: Unpack shallow mirror tarballs

Paul Barker pbarker at konsulko.com
Tue Feb 25 10:33:49 UTC 2020


On Mon, 24 Feb 2020 at 23:14, Paul Barker <pbarker at konsulko.com> wrote:
>
> On Mon, 24 Feb 2020 at 23:06, Christopher Larson <kergoth at gmail.com> wrote:
> >
> > I don't think this is right. This unpacks the shallow tarball into ud.clonedir. The fetcher is specifically done the way it is to avoid ud.clonedir ever being shallow so as to avoid having to maintain that state and convert it when necessary.
>
> Any suggestions on where we can unpack the shallow tarball then? We
> need it to be unpacked somewhere so that we can examine the
> .gitmodules file.

So my downloads directory blew up and I saw lots of fetch errors for
git SRC_URIs on builds overnight after testing this patch.

We could extract to a temporary directory as needed when downloading a
gitsm shallow mirror tarball and then throw this away once we've
checked .gitmodules. That would mean repeating the tarball extraction
if the download method is executed again but that should be fairly
rare. How does that sound?

The alternative would be to create a new 'gitsmshallow' directory
under DL_DIR for unpacking gitsm shallow mirror tarballs only. The
names of directories under 'gitsmshallow' would need to include the
commit hash given in the shallow tarball filename so that we don't
have clashes when DL_DIR is shared between builds which use different
SRCREVs of the same gitsm SRC_URI.

I also have a test case ready to go which I'll include in v2 of this
patch once we've decided where to extract the tarballs.

Thanks,
Paul


More information about the bitbake-devel mailing list