[bitbake-devel] [PATCH 0/4] Implement git shallow mirror tarball support

Christopher Larson chris_larson at mentor.com
Wed Aug 26 23:15:30 UTC 2015


On Wed, Aug 26, 2015 at 9:38 AM, Christopher Larson <kergoth at gmail.com>
wrote:

> From: Christopher Larson <chris_larson at mentor.com>
>
> Supercedes `[RFC PATCH 0/5] Implement git shallow mirror tarball support`.
>
> The shallow mirror tarball filename includes branch, revision, and depth.
> To
> enable, use the BB_GIT_SHALLOW variable, or BB_GIT_SHALLOW_<name> for
> specific
> URLs. This variable can hold either a clone depth (e.g. 1 to just get
> SRCREV),
> or a ref or commit, in which case we keep history up to that commit.
>
> Example:
>
>     BB_GIT_SHALLOW ?= "1"
>     BB_GIT_SHALLOW_pn-linux-yocto = ""
>     BB_GIT_SHALLOW_pn-linux-mel_mx6 = "v3.14"
>     BB_GIT_SHALLOW_pn-testrepo = "testbranch"
>
> Example in a recipe with multiple named uris, or multiple named branches
> in a
> single git URI:
>
>     BB_GIT_SHALLOW_main = "1"
>     BB_GIT_SHALLOW_doc = ""
>
> BB_GIT_SHALLOW affects both the tarballs being fetched and the mirror
> tarball
> which is created when BB_GENERATE_MIRROR_TARBALLS is enabled. If the
> shallow
> mirror tarball cannot be fetched, it will try to fetch the full mirror
> tarball
> and use that.
>
> Limitations:
>
> The shallow support will not, at this time, function correctly for
> linux-yocto, due to its branching scheme & validation.
>
> This implements support for shallow mirror tarballs, not shallow clones.
> Supporting shallow clones directly would be rather more problematic, as
> we'd
> need to hardcode the depth between branch HEAD and the SRCREV, and that
> depth
> would change as the branch is updated.
>

One point of clarification, as it was asked with the RFC version of this
series. This is in a comment, but I forgot to add it in the commit message:

A current clone is preferred to either tarball, a shallow tarball is preferred
to an out of date clone, and a missing clone will use either tarball.
-- 
Christopher Larson
kergoth at gmail 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/20150826/4cd23ce6/attachment-0002.html>


More information about the bitbake-devel mailing list