From 8bffa57ac454f4c35fcb53b2dfdcceb15fa01407 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 18 Mar 2020 22:37:09 -0500 Subject: Buildcache: fix relocation of binaries with relative rpaths (#15558) --- lib/spack/spack/relocate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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) -- cgit v1.2.3-70-g09d2