summaryrefslogtreecommitdiff
path: root/lib/spack/docs/packaging_guide.rst
diff options
context:
space:
mode:
authorChris Green <artists@fnal.gov>2019-07-24 14:49:23 -0500
committerPeter Scheibel <scheibel1@llnl.gov>2019-08-21 18:21:05 -0700
commitad4309b7827004010c60ee5ee8332322a5899166 (patch)
tree15f9ede3753d4ede181232fd8f363808dc40f81b /lib/spack/docs/packaging_guide.rst
parent1b8e0c36cb0ebe23eedf118e3a27555eefca34a0 (diff)
downloadspack-ad4309b7827004010c60ee5ee8332322a5899166.tar.gz
spack-ad4309b7827004010c60ee5ee8332322a5899166.tar.bz2
spack-ad4309b7827004010c60ee5ee8332322a5899166.tar.xz
spack-ad4309b7827004010c60ee5ee8332322a5899166.zip
Fetch strategies: new global option `no_cache`, new git option `get_full_repo`.
* All fetch strategies now accept the Boolean version keyword option `no_cache` in order to allow per-version control of cache-ability. * New git-specific version keyword option `get_full_repo` (Boolean). When true, disables the default `--depth 1` and `--single-branch` optimizations that are applied if supported by the git version and (in the former case) transport protocol. * The try / catch blog attempting `--depth 1` and retrying on failure has been removed in favor of more accurately ascertaining when the `--depth` option should work based on git version and protocol choice. Any failure is now treated as a real problem, and the clone is only attempted once. * Test improvements: * `mock_git_repository.checks[type_of_test].args['git']` is now specified as the URL (with leading `file://`) in order to avoid complaints when using `--depth`. * New type_of_test `tag-branch`. * mock_git_repository now provides `git_exe`. * Improved the action of the `git_version` fixture, which was previously hard-wired. * New tests of `--single-branch` and `--depth 1` behavior. * Add documentation of new options to the packaging guide.
Diffstat (limited to 'lib/spack/docs/packaging_guide.rst')
-rw-r--r--lib/spack/docs/packaging_guide.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index b5f1b60cbb..a859fceee7 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -574,7 +574,11 @@ Download caching
Spack maintains a cache (described :ref:`here <caching>`) which saves files
retrieved during package installations to avoid re-downloading in the case that
a package is installed with a different specification (but the same version) or
-reinstalled on account of a change in the hashing scheme.
+reinstalled on account of a change in the hashing scheme. It may (rarely) be
+necessary to avoid caching for a particular version by adding ``no_cache=True``
+as an option to the ``version()`` directive. Example situations would be a
+"snapshot"-like Version Control System (VCS) tag, a VCS branch such as
+``v6-16-00-patches``, or a URL specifying a regularly updated snapshot tarball.
^^^^^^^^^^^^^^^^^^
Version comparison
@@ -880,6 +884,11 @@ Git fetching supports the following parameters to ``version``:
* ``tag``: Name of a tag to fetch.
* ``commit``: SHA hash (or prefix) of a commit to fetch.
* ``submodules``: Also fetch submodules recursively when checking out this repository.
+* ``get_full_repo``: Ensure the full git history is checked out with all remote
+ branch information. Normally (``get_full_repo=False``, the default), the git
+ option ``--depth 1`` will be used if the version of git and the specified
+ transport protocol support it, and ``--single-branch`` will be used if the
+ version of git supports it.
Only one of ``tag``, ``branch``, or ``commit`` can be used at a time.