Buildcache: fix relocation of binaries with relative rpaths (#15558)

This commit is contained in:
Patrick Gartung 2020-03-18 22:37:09 -05:00 committed by GitHub
parent 69231c7d18
commit 8bffa57ac4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)