summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-01-26 14:47:33 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2015-02-02 11:19:54 -0800
commit70c8bf44b8d2613c54423562f81e049fbb956780 (patch)
tree034584e6ccc3690285959d092626a3e3f37b469c /lib
parent48f1ff87f836f214e72e1d02f47eac4678f0292a (diff)
downloadspack-70c8bf44b8d2613c54423562f81e049fbb956780.tar.gz
spack-70c8bf44b8d2613c54423562f81e049fbb956780.tar.bz2
spack-70c8bf44b8d2613c54423562f81e049fbb956780.tar.xz
spack-70c8bf44b8d2613c54423562f81e049fbb956780.zip
Fix for install sanity check -- don't count hidden dir layout files.
Diffstat (limited to 'lib')
-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():