diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-10-31 10:41:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 10:41:59 +0100 |
commit | 1ab888cdc1b0a42c9d855aacc0bacab6d7efb788 (patch) | |
tree | 2e0ad75bbea5c5044c0aeff841c29fff38ad0423 /lib | |
parent | 616d5a89d424391d51becf9b89953199c1f622de (diff) | |
download | spack-1ab888cdc1b0a42c9d855aacc0bacab6d7efb788.tar.gz spack-1ab888cdc1b0a42c9d855aacc0bacab6d7efb788.tar.bz2 spack-1ab888cdc1b0a42c9d855aacc0bacab6d7efb788.tar.xz spack-1ab888cdc1b0a42c9d855aacc0bacab6d7efb788.zip |
remove sequential filter in binary relo (#33608)
Currently there's a slow sequential step in binary relocation where all
strings of a binary are collected, with rpaths removed, and then
filtered for the old install root.
This is completely unnecessary, and also incorrect, since we replace
more than just the old install root in the prefix to prefix mapping. And
in fact the prefix to prefix mapping is parallel, and a single pass. So
even as an optimization, this filter makes no sense anymore.
Therefor we remove it
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/binary_distribution.py | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 7c62c58cb1..68b270c390 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -1644,27 +1644,15 @@ def relocate_package(spec, allow_root): old_prefix, new_prefix, ) - # Relocate links to the new install prefix - links = [link for link in buildinfo.get("relocate_links", [])] - relocate.relocate_links(links, old_layout_root, old_prefix, new_prefix) + + # Relocate links to the new install prefix + links = [link for link in buildinfo.get("relocate_links", [])] + relocate.relocate_links(links, old_layout_root, old_prefix, new_prefix) # For all buildcaches # relocate the install prefixes in text files including dependencies relocate.unsafe_relocate_text(text_names, prefix_to_prefix_text) - paths_to_relocate = [old_prefix, old_layout_root] - paths_to_relocate.extend(prefix_to_hash.keys()) - files_to_relocate = list( - filter( - lambda pathname: not relocate.file_is_relocatable( - pathname, paths_to_relocate=paths_to_relocate - ), - map( - lambda filename: os.path.join(workdir, filename), - buildinfo["relocate_binaries"], - ), - ) - ) # relocate the install prefixes in binary files including dependencies relocate.unsafe_relocate_text_bin(files_to_relocate, prefix_to_prefix_bin) |