summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2018-12-04 05:19:57 -0800
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2018-12-04 14:19:57 +0100
commit34f64f1f3fa1ffbf58f9f8617c677e567554ba9f (patch)
treeadfcc1e1926c3a9326f2a5211b65d943fba3ea9a /lib
parente3aa36f4cbe4a9519e87fcfd1ea2a4fd12c90134 (diff)
downloadspack-34f64f1f3fa1ffbf58f9f8617c677e567554ba9f.tar.gz
spack-34f64f1f3fa1ffbf58f9f8617c677e567554ba9f.tar.bz2
spack-34f64f1f3fa1ffbf58f9f8617c677e567554ba9f.tar.xz
spack-34f64f1f3fa1ffbf58f9f8617c677e567554ba9f.zip
improved constraint conflict error message (#9975)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/spec.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 4f84104f84..91d66483da 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -2053,8 +2053,14 @@ class Spec(object):
try:
dep.merge(dependency)
except UnsatisfiableSpecError as e:
- e.message = ("Conflicting conditional dependencies on"
- "package %s for spec %s" % (self.name, self))
+ e.message = (
+ "Conflicting conditional dependencies for spec"
+ "\n\n\t{0}\n\n"
+ "Cannot merge constraint"
+ "\n\n\t{1}\n\n"
+ "into"
+ "\n\n\t{2}"
+ .format(self, dependency.spec, dep.spec))
raise e
return dep