summaryrefslogtreecommitdiff
path: root/lib/spack/docs/environments.rst
diff options
context:
space:
mode:
authorScott Wittenburg <scott.wittenburg@kitware.com>2021-04-30 16:51:43 -0600
committerTodd Gamblin <tgamblin@llnl.gov>2021-05-07 10:07:53 -0700
commit91de23ce650ef4dd007b94f67c26e1e6901be354 (patch)
tree00615f6589684cbbcecf5e51405a496925de8fac /lib/spack/docs/environments.rst
parenta3d58129ecc8f8b17ce4fa88b4e7d75d4e0fc6d5 (diff)
downloadspack-91de23ce650ef4dd007b94f67c26e1e6901be354.tar.gz
spack-91de23ce650ef4dd007b94f67c26e1e6901be354.tar.bz2
spack-91de23ce650ef4dd007b94f67c26e1e6901be354.tar.xz
spack-91de23ce650ef4dd007b94f67c26e1e6901be354.zip
install cmd: --no-add in an env installs w/out concretize and add
In an active concretize environment, support installing one or more cli specs only if they are already present in the environment. The `--no-add` option is the default for root specs, but optional for dependency specs. I.e. if you `spack install <depspec>` in an environment, the dependency-only spec `depspec` will be added as a root of the environment before being installed. In addition, `spack install --no-add <spec>` fails if it does not find an unambiguous match for `spec`.
Diffstat (limited to 'lib/spack/docs/environments.rst')
-rw-r--r--lib/spack/docs/environments.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/spack/docs/environments.rst b/lib/spack/docs/environments.rst
index 76b974ff62..12f6f4121c 100644
--- a/lib/spack/docs/environments.rst
+++ b/lib/spack/docs/environments.rst
@@ -356,6 +356,18 @@ command also stores a Spack repo containing the ``package.py`` file
used at install time for each package in the ``repos/`` directory in
the Environment.
+The ``--no-add`` option can be used in a concrete environment to tell
+spack to install specs already present in the environment but not to
+add any new root specs to the environment. For root specs provided
+to ``spack install`` on the command line, ``--no-add`` is the default,
+while for dependency specs on the other hand, it is optional. In other
+words, if there is an unambiguous match in the active concrete environment
+for a root spec provided to ``spack install`` on the command line, spack
+does not require you to specify the ``--no-add` option to prevent the spec
+from being added again. At the same time, a spec that already exists in the
+environment, but only as a dependency, will be added to the environment as a
+root spec without the ``--no-add`` option.
+
^^^^^^^
Loading
^^^^^^^