diff options
author | Harmen Stoppels <me@harmenstoppels.nl> | 2024-04-30 13:55:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 13:55:48 +0200 |
commit | 7f2cedd31fa83e404c9701d93c9496d6d1824e4e (patch) | |
tree | 325c16377deb20f7eeae77c5ce9b8b7cf27498ed /lib | |
parent | d47951a1e3db6bbf884bf94a1abde2e0d5e1aa13 (diff) | |
download | spack-7f2cedd31fa83e404c9701d93c9496d6d1824e4e.tar.gz spack-7f2cedd31fa83e404c9701d93c9496d6d1824e4e.tar.bz2 spack-7f2cedd31fa83e404c9701d93c9496d6d1824e4e.tar.xz spack-7f2cedd31fa83e404c9701d93c9496d6d1824e4e.zip |
hack: drop glibc and musl in old concretizer (#43914)
The old concretizer creates a cyclic graph when expanding virtuals for
`iconv`, which is a bug. This hack drops glibc and musl as possible
providers for `iconv` in the old concretizer to work around it.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/concretize.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index e1f1170b91..b311d777f4 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -74,6 +74,10 @@ class Concretizer: #: during concretization. Used for testing and for mirror creation check_for_compiler_existence = None + #: Packages that the old concretizer cannot deal with correctly, and cannot build anyway. + #: Those will not be considered as providers for virtuals. + non_buildable_packages = {"glibc", "musl"} + def __init__(self, abstract_spec=None): if Concretizer.check_for_compiler_existence is None: Concretizer.check_for_compiler_existence = not spack.config.get( @@ -113,7 +117,11 @@ class Concretizer: pref_key = lambda spec: 0 # no-op pref key if spec.virtual: - candidates = spack.repo.PATH.providers_for(spec) + candidates = [ + s + for s in spack.repo.PATH.providers_for(spec) + if s.name not in self.non_buildable_packages + ] if not candidates: raise spack.error.UnsatisfiableProviderSpecError(candidates[0], spec) |