summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2021-02-23 09:53:07 -0800
committerGitHub <noreply@github.com>2021-02-23 09:53:07 -0800
commite72ad6223a8d48b064d4a344b3a68d71fe47a953 (patch)
tree25295686f074b3a602230e7bfd8ac3ba6b6be42b /lib
parentf9ff80e2135fb14922c856f66ec6d97332082a2c (diff)
downloadspack-e72ad6223a8d48b064d4a344b3a68d71fe47a953.tar.gz
spack-e72ad6223a8d48b064d4a344b3a68d71fe47a953.tar.bz2
spack-e72ad6223a8d48b064d4a344b3a68d71fe47a953.tar.xz
spack-e72ad6223a8d48b064d4a344b3a68d71fe47a953.zip
reduce strictness of directory layout spec-equality check (#21869)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/directory_layout.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py
index cbaa9b47fd..9cf148a33f 100644
--- a/lib/spack/spack/directory_layout.py
+++ b/lib/spack/spack/directory_layout.py
@@ -347,7 +347,13 @@ class YamlDirectoryLayout(DirectoryLayout):
#
# TODO: remove this when we do better concretization and don't
# ignore build-only deps in hashes.
- elif installed_spec == spec.copy(deps=('link', 'run')):
+ elif (installed_spec.copy(deps=('link', 'run')) ==
+ spec.copy(deps=('link', 'run'))):
+ # The directory layout prefix is based on the dag hash, so among
+ # specs with differing full-hash but matching dag-hash, only one
+ # may be installed. This means for example that for two instances
+ # that differ only in CMake version used to build, only one will
+ # be installed.
return path
if spec.dag_hash() == installed_spec.dag_hash():