summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/solver/asp.py12
-rw-r--r--lib/spack/spack/spec.py2
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 588e601561..21dd185df4 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -525,12 +525,12 @@ class Result:
best = min(self.answers)
opt, _, answer = best
for input_spec in self.abstract_specs:
- node = SpecBuilder.root_node(pkg=input_spec.name)
+ node = SpecBuilder.main_node(pkg=input_spec.name)
if input_spec.virtual:
providers = [
spec.name for spec in answer.values() if spec.package.provides(input_spec.name)
]
- node = SpecBuilder.root_node(pkg=providers[0])
+ node = SpecBuilder.main_node(pkg=providers[0])
candidate = answer.get(node)
if candidate and candidate.satisfies(input_spec):
@@ -2535,7 +2535,7 @@ class SpecBuilder:
node_regex = re.compile(r"node\(\d,\"(.*)\"\)")
@staticmethod
- def root_node(*, pkg: str) -> str:
+ def main_node(*, pkg: str) -> str:
"""Given a package name, returns the string representation of the root node in
the ASP encoding.
@@ -2650,7 +2650,7 @@ class SpecBuilder:
extendee_spec = package.extendee_spec
if extendee_spec:
- extendee_node = SpecBuilder.root_node(pkg=extendee_spec.name)
+ extendee_node = SpecBuilder.main_node(pkg=extendee_spec.name)
package.update_external_dependencies(self._specs.get(extendee_node, None))
def depends_on(self, parent_node, dependency_node, type):
@@ -2700,11 +2700,11 @@ class SpecBuilder:
# order is determined by the DAG. A spec's flags come after any of its ancestors
# on the compile line
- node = SpecBuilder.root_node(pkg=spec.name)
+ node = SpecBuilder.main_node(pkg=spec.name)
source_key = (node, flag_type)
if source_key in self._flag_sources:
order = [
- SpecBuilder.root_node(pkg=s.name)
+ SpecBuilder.main_node(pkg=s.name)
for s in spec.traverse(order="post", direction="parents")
]
sorted_sources = sorted(
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 561cd7baba..169fd88a5b 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -2983,7 +2983,7 @@ class Spec:
providers = [spec.name for spec in answer.values() if spec.package.provides(name)]
name = providers[0]
- node = spack.solver.asp.SpecBuilder.root_node(pkg=name)
+ node = spack.solver.asp.SpecBuilder.main_node(pkg=name)
assert node in answer, f"cannot find {name} in the list of specs {','.join(answer.keys())}"
concretized = answer[node]