diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2023-12-12 19:40:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 10:40:31 -0800 |
commit | 37cdcc7172adf6347dd6ce08017e0e08916bb2fe (patch) | |
tree | 4671d1c4b0a0b1223ee23b277439995fce0ba6cf | |
parent | 0a40bb72e8df95216b2be5fd17d48c8297a79dd4 (diff) | |
download | spack-37cdcc7172adf6347dd6ce08017e0e08916bb2fe.tar.gz spack-37cdcc7172adf6347dd6ce08017e0e08916bb2fe.tar.bz2 spack-37cdcc7172adf6347dd6ce08017e0e08916bb2fe.tar.xz spack-37cdcc7172adf6347dd6ce08017e0e08916bb2fe.zip |
mysql: fix issue when using old core API call (#41573)
MySQL was performing a core API call to `Spec.flat_dependencies`
when setting up the build environment. This function is an
implementation detail of the old concretizer, where multiple nodes
from the same package are not allowed.
This PR uses a more idiomatic way to check if "python" is
in the DAG.
For reference, see #11356 to check why the call was introduced.
-rw-r--r-- | lib/spack/spack/spec.py | 4 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/mysql/package.py | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 20e5c3ffa3..88184de30f 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -3128,9 +3128,7 @@ class Spec: except spack.error.UnsatisfiableSpecError as e: # Here, the DAG contains two instances of the same package - # with inconsistent constraints. Users cannot produce - # inconsistent specs like this on the command line: the - # parser doesn't allow it. Spack must be broken! + # with inconsistent constraints. raise InconsistentSpecError("Invalid Spec DAG: %s" % e.message) from e def index(self, deptype="all"): diff --git a/var/spack/repos/builtin/packages/mysql/package.py b/var/spack/repos/builtin/packages/mysql/package.py index f044e35440..1fee55fda9 100644 --- a/var/spack/repos/builtin/packages/mysql/package.py +++ b/var/spack/repos/builtin/packages/mysql/package.py @@ -191,5 +191,5 @@ class Mysql(CMakePackage): if int(cxxstd) > 14: env.append_flags("CXXFLAGS", "-Wno-error=register") - if "python" in self.spec.flat_dependencies() and self.spec.satisfies("@:7"): + if "python" in self.spec and self.spec.satisfies("@:7"): self._fix_dtrace_shebang(env) |