From d2d2234def5a97510e6a98e831e0f86fac61bc59 Mon Sep 17 00:00:00 2001
From: Axel Huebl <axel.huebl@plasma.ninja>
Date: Tue, 30 Aug 2016 17:00:09 +0200
Subject: [PATCH] HDF5 Dependency: Rewrite to Union

@adamjstewart
```
think you'll find that if you try running something like:
spack spec libsplash ^hdf5@1.8.15
It will complain that libsplash does not depend on hdf5.
This is a bug in Spack's dependency resolution. A workaround
for this is to tell it to always depend on hdf5.
```

@davydden
```
to expand on @adamjstewart comment, spack will make a union
of dependencies,
i.e. hdf5@1.8.6: + hdf5+mpi = hdf5:1.8.6:+mpi, that's why it works.
```

thank you for the hint!
---
 var/spack/repos/builtin/packages/libsplash/package.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/var/spack/repos/builtin/packages/libsplash/package.py b/var/spack/repos/builtin/packages/libsplash/package.py
index dd47ea0993..0659f7d650 100644
--- a/var/spack/repos/builtin/packages/libsplash/package.py
+++ b/var/spack/repos/builtin/packages/libsplash/package.py
@@ -46,8 +46,8 @@ class Libsplash(Package):
             description='Enable parallel I/O (one-file aggregation) support')
 
     depends_on('cmake', type='build')
-    depends_on('hdf5@1.8.6:', when='~mpi')
-    depends_on('hdf5@1.8.6:+mpi', when='+mpi')
+    depends_on('hdf5@1.8.6:')
+    depends_on('hdf5+mpi', when='+mpi')
     depends_on('mpi', when='+mpi')
 
     def install(self, spec, prefix):
-- 
GitLab