summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/package.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 43b1fcd9c8..0b6bc4ce6c 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -836,10 +836,7 @@ class Package(object):
self.install(self.spec, self.prefix)
# Ensure that something was actually installed.
- if not os.listdir(self.prefix):
- raise InstallError(
- "Install failed for %s. Nothing was installed!"
- % self.name)
+ self._sanity_check_install()
# On successful install, remove the stage.
if not keep_stage:
@@ -884,6 +881,15 @@ class Package(object):
spack.hooks.post_install(self)
+
+ def _sanity_check_install(self):
+ installed = set(os.listdir(self.prefix))
+ installed.difference_update(spack.install_layout.hidden_file_paths)
+ if not installed:
+ raise InstallError(
+ "Install failed for %s. Nothing was installed!" % self.name)
+
+
def do_install_dependencies(self, **kwargs):
# Pass along paths of dependencies here
for dep in self.spec.dependencies.values():