Do not check directory layout for external packages (#2172)

External packages do not have an spec.yaml file so don't check for it.
Without this change any time a package depends on an external package
when the new package is installed you will get the error

Install prefix exists but contains no spec.yaml

This problem has also haunted me since I started using Spack since PETSc
depends on Python and I used an external python but fortunately it
was relatively easy to debug once I could reproduce it at will.

Funded-by: IDEAS
Project: IDEAS/xSDK
Time: 1 hour
This commit is contained in:
Barry Smith
2016-10-29 22:57:41 -05:00
committed by Todd Gamblin
parent c2d58d39dd
commit ef2c42a889

View File

@@ -468,7 +468,7 @@ def _add(self, spec, directory_layout=None, explicit=False):
if key not in self._data:
installed = False
path = None
if directory_layout:
if not spec.external and directory_layout:
path = directory_layout.path_for_spec(spec)
try:
directory_layout.check_installed(spec)