summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAxel Huebl <axel.huebl@plasma.ninja>2020-04-21 14:22:30 -0700
committerGitHub <noreply@github.com>2020-04-21 16:22:30 -0500
commitca4c0b97ecf13b4a9c9007bb7ff4912cddae820c (patch)
tree0ba14d1f011ed4d46096bf0b274bcfdb17f09f63 /lib
parent272c47207d5ce7f1e6f5f6b4e3958f5b99283c2c (diff)
downloadspack-ca4c0b97ecf13b4a9c9007bb7ff4912cddae820c.tar.gz
spack-ca4c0b97ecf13b4a9c9007bb7ff4912cddae820c.tar.bz2
spack-ca4c0b97ecf13b4a9c9007bb7ff4912cddae820c.tar.xz
spack-ca4c0b97ecf13b4a9c9007bb7ff4912cddae820c.zip
Doc: Conflict Msg Pkg Guide (#16201)
Document the nice `msg=` argument in conflicts. Super useful for less generic conflict guidance.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/packaging_guide.rst10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index 26f843aa0e..7abadaac82 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -2169,13 +2169,17 @@ Adding the following to a package:
.. code-block:: python
- conflicts('%intel', when='@1.2')
+ conflicts('%intel', when='@:1.2',
+ msg='<myNicePackage> <= v1.2 cannot be built with Intel ICC, '
+ 'please use a newer release.')
we express the fact that the current package *cannot be built* with the Intel
-compiler when we are trying to install version "1.2". The ``when`` argument can
-be omitted, in which case the conflict will always be active.
+compiler when we are trying to install a version "<=1.2". The ``when`` argument
+can be omitted, in which case the conflict will always be active.
Conflicts are always evaluated after the concretization step has been performed,
and if any match is found a detailed error message is shown to the user.
+You can add an additional message via the ``msg=`` parameter to a conflict that
+provideds more specific instructions for users.
.. _packaging_extensions: