summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGregory Becker <becker33@llnl.gov>2022-11-11 08:15:10 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2022-11-11 09:30:32 -0800
commitbb8b4f9979e87ae3fb63a3adcb768eda09e5b059 (patch)
treee244c58484e37560d93115ee3b9e356f0f4b8359 /lib
parentfc7a16e77ebd51f9a86a726b412af9f2a21aa8c4 (diff)
downloadspack-bb8b4f9979e87ae3fb63a3adcb768eda09e5b059.tar.gz
spack-bb8b4f9979e87ae3fb63a3adcb768eda09e5b059.tar.bz2
spack-bb8b4f9979e87ae3fb63a3adcb768eda09e5b059.tar.xz
spack-bb8b4f9979e87ae3fb63a3adcb768eda09e5b059.zip
ensure view projections for extensions always point to extendeev0.19.0releases/latest
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/filesystem_view.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/spack/spack/filesystem_view.py b/lib/spack/spack/filesystem_view.py
index f8cc382ef7..553d0b4108 100644
--- a/lib/spack/spack/filesystem_view.py
+++ b/lib/spack/spack/filesystem_view.py
@@ -493,9 +493,14 @@ class YamlFilesystemView(FilesystemView):
Relies on the ordering of projections to avoid ambiguity.
"""
spec = spack.spec.Spec(spec)
- proj = spack.projections.get_projection(self.projections, spec)
+ locator_spec = spec
+
+ if spec.package.extendee_spec:
+ locator_spec = spec.package.extendee_spec
+
+ proj = spack.projections.get_projection(self.projections, locator_spec)
if proj:
- return os.path.join(self._root, spec.format(proj))
+ return os.path.join(self._root, locator_spec.format(proj))
return self._root
def get_all_specs(self):
@@ -743,6 +748,10 @@ class SimpleFilesystemView(FilesystemView):
Relies on the ordering of projections to avoid ambiguity.
"""
spec = spack.spec.Spec(spec)
+
+ if spec.package.extendee_spec:
+ spec = spec.package.extendee_spec
+
proj = spack.projections.get_projection(self.projections, spec)
if proj:
return os.path.join(self._root, spec.format(proj))