summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Gartung <gartung@fnal.gov>2020-03-18 22:37:09 -0500
committerGitHub <noreply@github.com>2020-03-18 22:37:09 -0500
commit8bffa57ac454f4c35fcb53b2dfdcceb15fa01407 (patch)
tree52852e1851dbfb525217422364633946324b96e9 /lib
parent69231c7d189239df9874b4a4273acf16d64a3dc1 (diff)
downloadspack-8bffa57ac454f4c35fcb53b2dfdcceb15fa01407.tar.gz
spack-8bffa57ac454f4c35fcb53b2dfdcceb15fa01407.tar.bz2
spack-8bffa57ac454f4c35fcb53b2dfdcceb15fa01407.tar.xz
spack-8bffa57ac454f4c35fcb53b2dfdcceb15fa01407.zip
Buildcache: fix relocation of binaries with relative rpaths (#15558)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/relocate.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py
index afbae543af..c7d442a427 100644
--- a/lib/spack/spack/relocate.py
+++ b/lib/spack/spack/relocate.py
@@ -137,7 +137,7 @@ def get_normalized_elf_rpaths(orig_path_name, rel_rpaths):
norm_rpaths = list()
for rpath in rel_rpaths:
if rpath.startswith('$ORIGIN'):
- sub = re.sub('$ORIGIN',
+ sub = re.sub(re.escape('$ORIGIN'),
os.path.dirname(orig_path_name),
rpath)
norm = os.path.normpath(sub)