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.
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							0a40bb72e8
						
					
				
				
					commit
					37cdcc7172
				
			@@ -3128,9 +3128,7 @@ def flat_dependencies(self, **kwargs):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        except spack.error.UnsatisfiableSpecError as e:
 | 
					        except spack.error.UnsatisfiableSpecError as e:
 | 
				
			||||||
            # Here, the DAG contains two instances of the same package
 | 
					            # Here, the DAG contains two instances of the same package
 | 
				
			||||||
            # with inconsistent constraints.  Users cannot produce
 | 
					            # with inconsistent constraints.
 | 
				
			||||||
            # inconsistent specs like this on the command line: the
 | 
					 | 
				
			||||||
            # parser doesn't allow it. Spack must be broken!
 | 
					 | 
				
			||||||
            raise InconsistentSpecError("Invalid Spec DAG: %s" % e.message) from e
 | 
					            raise InconsistentSpecError("Invalid Spec DAG: %s" % e.message) from e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def index(self, deptype="all"):
 | 
					    def index(self, deptype="all"):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -191,5 +191,5 @@ def setup_build_environment(self, env):
 | 
				
			|||||||
            if int(cxxstd) > 14:
 | 
					            if int(cxxstd) > 14:
 | 
				
			||||||
                env.append_flags("CXXFLAGS", "-Wno-error=register")
 | 
					                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)
 | 
					            self._fix_dtrace_shebang(env)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user