summaryrefslogtreecommitdiffstats
path: root/bitbake/doc
diff options
context:
space:
mode:
authorPaul Barker <paul@pbarker.dev>2021-10-21 18:22:26 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-27 09:49:02 +0100
commit5933782d2b82cd455e68359a0939a8b83bd566d6 (patch)
treeb504199a625441ca467eb3d426b787c1d2eb3f54 /bitbake/doc
parent75e63f41a85c11d9557b8a50c0cd17ed1e854c2f (diff)
downloadpoky-5933782d2b82cd455e68359a0939a8b83bd566d6.tar.gz
bitbake: doc: bitbake-user-manual: Document BB_GIT_SHALLOW and friends
Documentation is based on the commit message of bitbake rev 5ed7d85fda and mailing list discussion. [YOCTO #14493] (Bitbake rev: a183322ef56c64c97aa2b72fedcdf58e29dbb3cf) Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Reviewed-by: Quentin Schulz <foss@0leil.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/doc')
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst56
1 files changed, 56 insertions, 0 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index cbd1e795da..e955beb130 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -281,6 +281,62 @@ overview of their function and contents.
281 281
282 BB_GENERATE_MIRROR_TARBALLS = "1" 282 BB_GENERATE_MIRROR_TARBALLS = "1"
283 283
284 :term:`BB_GENERATE_SHALLOW_TARBALLS`
285 Setting this variable to "1" when :term:`BB_GIT_SHALLOW` is also set to
286 "1" causes bitbake to generate shallow mirror tarballs when fetching git
287 repositories. The number of commits included in the shallow mirror
288 tarballs is controlled by :term:`BB_GIT_SHALLOW_DEPTH`.
289
290 If both :term:`BB_GIT_SHALLOW` and :term:`BB_GENERATE_MIRROR_TARBALLS` are
291 enabled, bitbake will generate shallow mirror tarballs by default for git
292 repositories. This separate variable exists so that shallow tarball
293 generation can be enabled without needing to also enable normal mirror
294 generation if it is not desired.
295
296 For example usage, see :term:`BB_GIT_SHALLOW`.
297
298 :term:`BB_GIT_SHALLOW`
299 Setting this variable to "1" enables the support for fetching, using and
300 generating mirror tarballs of `shallow git repositories <https://riptutorial.com/git/example/4584/shallow-clone>`_.
301 The external `git-make-shallow <https://git.openembedded.org/bitbake/tree/bin/git-make-shallow>`_
302 script is used for shallow mirror tarball creation.
303
304 When :term:`BB_GIT_SHALLOW` is enabled, bitbake will attempt to fetch a shallow
305 mirror tarball. If the shallow mirror tarball cannot be fetched, it will
306 try to fetch the full mirror tarball and use that.
307
308 When a mirror tarball is not available, a full git clone will be performed
309 regardless of whether this variable is set or not. Support for shallow
310 clones is not currently implemented as git does not directly support
311 shallow cloning a particular git commit hash (it only supports cloning
312 from a tag or branch reference).
313
314 See also :term:`BB_GIT_SHALLOW_DEPTH` and
315 :term:`BB_GENERATE_SHALLOW_TARBALLS`.
316
317 Example usage::
318
319 BB_GIT_SHALLOW ?= "1"
320
321 # Keep only the top commit
322 BB_GIT_SHALLOW_DEPTH ?= "1"
323
324 # This defaults to enabled if both BB_GIT_SHALLOW and
325 # BB_GENERATE_MIRROR_TARBALLS are enabled
326 BB_GENERATE_SHALLOW_TARBALLS ?= "1"
327
328 :term:`BB_GIT_SHALLOW_DEPTH`
329 When used with :term:`BB_GENERATE_SHALLOW_TARBALLS`, this variable sets
330 the number of commits to include in generated shallow mirror tarballs.
331 With a depth of 1, only the commit referenced in :term:`SRCREV` is
332 included in the shallow mirror tarball. Increasing the depth includes
333 additional parent commits, working back through the commit history.
334
335 If this variable is unset, bitbake will default to a depth of 1 when
336 generating shallow mirror tarballs.
337
338 For example usage, see :term:`BB_GIT_SHALLOW`.
339
284 :term:`BB_HASHBASE_WHITELIST` 340 :term:`BB_HASHBASE_WHITELIST`
285 Lists variables that are excluded from checksum and dependency data. 341 Lists variables that are excluded from checksum and dependency data.
286 Variables that are excluded can therefore change without affecting 342 Variables that are excluded can therefore change without affecting