Buildcache: Fix bug in binary string replacement (#17075)

* Fix bug in binary string replacement that results in padding being added multiple times

* Update comment

* Update comment again
This commit is contained in:
Patrick Gartung 2020-06-12 13:38:33 -05:00 committed by GitHub
parent c4756159f3
commit 08c21e4e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -846,7 +846,11 @@ def relocate_text_bin(
for old_dep_prefix, new_dep_prefix in new_prefixes.items():
if len(new_dep_prefix) <= len(old_dep_prefix):
_replace_prefix_bin(binary, old_dep_prefix, new_dep_prefix)
_replace_prefix_bin(binary, orig_spack, new_spack)
_replace_prefix_bin(binary, orig_install_prefix, new_install_prefix)
# Note: Replacement of spack directory should not be done. This causes
# an incorrect replacement path in the case where the install root is a
# subdirectory of the spack directory.
def is_relocatable(spec):