summaryrefslogtreecommitdiff
path: root/lib/spack/docs/config_yaml.rst
diff options
context:
space:
mode:
authorTamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>2019-09-03 16:31:27 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2019-09-03 16:31:27 -0700
commitc141e99e062ba7fa5a140ebf4ca5d1abbe40987f (patch)
tree0530fdfe60197de5174b2b028f284b5ddb332bcf /lib/spack/docs/config_yaml.rst
parent868f7869e0643d975aac7f8d4b82bd77a29ba036 (diff)
downloadspack-c141e99e062ba7fa5a140ebf4ca5d1abbe40987f.tar.gz
spack-c141e99e062ba7fa5a140ebf4ca5d1abbe40987f.tar.bz2
spack-c141e99e062ba7fa5a140ebf4ca5d1abbe40987f.tar.xz
spack-c141e99e062ba7fa5a140ebf4ca5d1abbe40987f.zip
Use spack/user-specific stage root by default; stage cleaning (#12516)
* When cleaning the stage root, only remove directories that appear to be used for staging Spack packages. Previously Spack was clearing all directories in the stage root, which could remove content not related to Spack if the user chose a staging root which contains files/directories not managed by Spack. * The documentation is updated with warnings about choosing a stage directory that is only managed by Spack (although generally the check added in this PR for "spack clean" should avoid removing content that was not created by Spack) * The default stage directory (in config.yaml) is now $tempdir/$user/spack-stage and the logic is updated to omit the $user portion of this path if $tempdir already contains a $user directory. * When creating stage root assign user read/write permissions to all directories in the path under $user. Previously Spack was assigning the permissions of the first existing parent directory
Diffstat (limited to 'lib/spack/docs/config_yaml.rst')
-rw-r--r--lib/spack/docs/config_yaml.rst18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/spack/docs/config_yaml.rst b/lib/spack/docs/config_yaml.rst
index ef5d7b65be..92030b8ac9 100644
--- a/lib/spack/docs/config_yaml.rst
+++ b/lib/spack/docs/config_yaml.rst
@@ -86,22 +86,28 @@ Spack is designed to run out of a user home directory, and on many
systems the home directory is a (slow) network file system. On most systems,
building in a temporary file system is faster. Usually, there is also more
space available in the temporary location than in the home directory. If the
-username is not already in the path, Spack will also append the value of
-`$user` to the path.
+username is not already in the path, Spack will append the value of ``$user`` to
+the selected ``build_stage`` path.
-.. warning:: We highly recommend appending `spack-stage` to `$tempdir` in order
- to ensure `spack clean` does not delete everything in `$tempdir`.
+.. warning:: We highly recommend specifying ``build_stage`` paths that
+ distinguish between staging and other activities to ensure
+ ``spack clean`` does not inadvertently remove unrelated files.
+ This can be accomplished by using a combination of ``spack`` and or
+ ``stage`` in each path as shown in the default settings and documented
+ examples.
By default, Spack's ``build_stage`` is configured like this:
.. code-block:: yaml
build_stage:
- - $tempdir/spack-stage
+ - $tempdir/$user/spack-stage
+ - ~/.spack/stage
This can be an ordered list of paths that Spack should search when trying to
find a temporary directory for the build stage. The list is searched in
order, and Spack will use the first directory to which it has write access.
+
Specifying `~/.spack/stage` first will ensure each user builds in their home
directory. The historic Spack stage path `$spack/var/spack/stage` will build
directly inside the Spack instance. See :ref:`config-file-variables` for more
@@ -116,7 +122,7 @@ deleted, but you can manually purge them with :ref:`spack clean --stage
.. note::
The build will fail if there is no writable directory in the ``build_stage``
- list.
+ list, where any user- and site-specific setting will be searched first.
--------------------
``source_cache``