-
Notifications
You must be signed in to change notification settings - Fork 2.4k
External packages appear installed even if they are not #8036
Copy link
Copy link
Closed
epfl-scitas/spack
#168Labels
Description
If Spack is configured with a packages.yaml that includes external packages, these packages may appear installed even if they are not. The cause of that is how we compute the installed property:
spack/lib/spack/spack/package.py
Lines 957 to 959 in 1307ad3
| @property | |
| def installed(self): | |
| return os.path.isdir(self.prefix) |
which returns True if the prefix is there (without any check of the DB).
Expected Result
Starting with this packages.yaml:
packages:
openssl:
buildable: False
paths:
openssl@system: /usr/liband Spack at 231664e:
$ spack find
==> 0 installed packages.
I would expect the following:
$ spack-python
Spack version 0.11.2
Python 2.7.15rc1, Linux x86_64
>>> import spack.spec
>>> s = spack.spec.Spec('openssl')
>>> s.concretize()
>>> s.package.installed
FalseActual Result
What we obtain instead is that openssl appears to be installed:
$ spack-python
Spack version 0.11.2
Python 2.7.15rc1, Linux x86_64
>>> import spack.spec
>>> s = spack.spec.Spec('openssl')
>>> s.concretize()
>>> s.package.installed
TrueInformation on your system
The only relevant part should be the packages.yaml above
Reactions are currently unavailable