From 9cd7fd1c98a1765fcb6d31d16cc530429df8530c Mon Sep 17 00:00:00 2001 From: psakievich Date: Fri, 26 Apr 2024 06:32:27 -0600 Subject: [PATCH] Update lib/spack/spack/solver/asp.py Co-authored-by: Greg Becker --- lib/spack/spack/solver/asp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 8b3ce15331f..ebf340e172d 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -1999,10 +1999,10 @@ def define_ad_hoc_versions_from_specs( # best possible, so they're guaranteed to be used preferentially. version = s.versions.concrete - if version is None or any( - (v == version and not isinstance(version, vn.GitVersion)) + if version is None or (not isinstance(version, vn.GitVersion) and any( + v == version for v in self.possible_versions[s.name] - ): + )): continue if require_checksum and not _is_checksummed_git_version(version):