reduce strictness of directory layout spec-equality check (#21869)

This commit is contained in:
Peter Scheibel 2021-02-23 09:53:07 -08:00 committed by GitHub
parent f9ff80e213
commit e72ad6223a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -347,7 +347,13 @@ def check_installed(self, spec):
#
# 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():