diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-08-25 17:55:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 17:55:58 +0200 |
commit | 8654197c56785e1a573a8e595c1ca213dfa8d191 (patch) | |
tree | faf40d0daacc2c2f82d26d65985cf33a1c491175 /lib | |
parent | b332c1055c242108c660596c1ac4c40fe2d91941 (diff) | |
download | spack-8654197c56785e1a573a8e595c1ca213dfa8d191.tar.gz spack-8654197c56785e1a573a8e595c1ca213dfa8d191.tar.bz2 spack-8654197c56785e1a573a8e595c1ca213dfa8d191.tar.xz spack-8654197c56785e1a573a8e595c1ca213dfa8d191.zip |
ASP-based solver: prevent the use of hashes that are not available (#32354)
fixes #32348
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/solver/concretize.lp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 48cb0f1d36..9884530306 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -1059,6 +1059,11 @@ no_flags(Package, FlagType) % you can't choose an installed hash for a dev spec :- hash(Package, Hash), variant_value(Package, "dev_path", _). +% You can't install a hash, if it is not installed +:- hash(Package, Hash), not installed_hash(Package, Hash). +% This should be redundant given the constraint above +:- hash(Package, Hash1), hash(Package, Hash2), Hash1 != Hash2. + % if a hash is selected, we impose all the constraints that implies impose(Hash) :- hash(Package, Hash). |