summaryrefslogtreecommitdiff
path: root/lib/spack/llnl
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2023-02-16 19:36:22 +0100
committerGitHub <noreply@github.com>2023-02-16 10:36:22 -0800
commit68b711c1ad7157930154fc37f4a912aaf325fbfb (patch)
treef71499a5061dd5f98f3035bc3dcefdf9224a4d44 /lib/spack/llnl
parent69369429b6f3cc215a061823c1c7c9aab52b441c (diff)
downloadspack-68b711c1ad7157930154fc37f4a912aaf325fbfb.tar.gz
spack-68b711c1ad7157930154fc37f4a912aaf325fbfb.tar.bz2
spack-68b711c1ad7157930154fc37f4a912aaf325fbfb.tar.xz
spack-68b711c1ad7157930154fc37f4a912aaf325fbfb.zip
view: fix issue with non-contributing specs (#34661)
Specs that did not contribute any files to an env view caused a problem where zip(specs, files grouped by prefix) got "out of sync", causing the wrong merge map to be passed to a package's `add_files_to_view`, which specifically caused an issue where *sometimes* bin/python ended up as a symlink instead of a copy. One such example is kokkos + kokkos-nvcc-wrapper, as the latter package only provides the file bin/nvcc_wrapper, which is also added to view by kokkos, causing kokkos-nvcc-wrapper to contribute 0 files. The test feels a bit contrived, but it captures the problem... pkg a is added first and has 0 files to contribute, pkg b adds a single file, and we check if pkg b receives a merge map (and a does not).
Diffstat (limited to 'lib/spack/llnl')
-rw-r--r--lib/spack/llnl/util/link_tree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/llnl/util/link_tree.py b/lib/spack/llnl/util/link_tree.py
index f1ca5ebe34..52268bc3f8 100644
--- a/lib/spack/llnl/util/link_tree.py
+++ b/lib/spack/llnl/util/link_tree.py
@@ -75,7 +75,7 @@ class SourceMergeVisitor(BaseDirectoryVisitor):
# so that we have a fast lookup and can run mkdir in order.
self.directories = OrderedDict()
- # Files to link. Maps dst_rel to (src_rel, src_root)
+ # Files to link. Maps dst_rel to (src_root, src_rel)
self.files = OrderedDict()
def before_visit_dir(self, root, rel_path, depth):