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:
|
@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/lib
and 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
False
Actual 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
True
Information on your system
The only relevant part should be the packages.yaml above
If Spack is configured with a
packages.yamlthat includes external packages, these packages may appear installed even if they are not. The cause of that is how we compute theinstalledproperty:spack/lib/spack/spack/package.py
Lines 957 to 959 in 1307ad3
which returns
Trueif the prefix is there (without any check of the DB).Expected Result
Starting with this
packages.yaml:and Spack at 231664e:
I would expect the following:
Actual Result
What we obtain instead is that
opensslappears to be installed:Information on your system
The only relevant part should be the
packages.yamlabove