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

Christopher Larson kergoth at gmail.com
Thu Aug 13 23:46:34 UTC 2015


From: Christopher Larson <chris_larson at mentor.com>

Please review the following changes for suitability for inclusion. If you have
any objections or suggestions for improvement, please respond to the patches. If
you agree with the changes, please provide your Acked-by.

This only implements support for shallow mirror tarballs, not shallow clones.

The 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.

The shallow support will not, at this time, function correctly for
linux-yocto, due to its branching scheme & validation.

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"

This implementation will attempt to fetch a full mirror tarball if it was
unable to fetch a shallow tarball. If `BB_GIT_SHALLOW` and
`BB_GENERATE_MIRROR_TARBALLS` are enabled for a given recipe, a shallow
tarball will be emitted.


The following changes since commit 0c419902e5f58dcee9b7fbe9af1928da37e18399:

  toaster: reduced amount of instance attributes (2015-08-10 13:56:03 -0700)

are available in the git repository at:

  git at github.com:kergoth/bitbake shallow-git-mirror-tarballs

for you to fetch changes up to 01c1164fe4b54d5f3de1fd4863808af88f06c144:

  bb.fetch.git: use ud.mirrortarballs (2015-08-13 15:48:01 -0700)

----------------------------------------------------------------
Christopher Larson (5):
  bb.fetch.git: add support for shallow mirror tarballs
  bb.fetch.git: truncate branches to SRCREV
  bb.fetch: simplify mirror tarball handling in try_mirror_url
  bb.fetch: support ud.mirrortarballs
  bb.fetch.git: use ud.mirrortarballs

 lib/bb/fetch2/__init__.py |  27 ++++---
 lib/bb/fetch2/git.py      | 182 +++++++++++++++++++++++++++++++++++-----------
 2 files changed, 154 insertions(+), 55 deletions(-)

-- 
2.2.1



More information about the bitbake-devel mailing list