aboutsummaryrefslogtreecommitdiff
path: root/src/relocation.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-03-07 01:45:07 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-03-07 01:45:07 -0500
commit2a9eaa0aa4a046bb2dfd4c2aeb1ebbdcff0770b9 (patch)
tree374904f82f827222746c8a4ca40664eba6641d7f /src/relocation.c
parente6d43d723b75ffc489f436238459175eab49d895 (diff)
downloadspmc-2a9eaa0aa4a046bb2dfd4c2aeb1ebbdcff0770b9.tar.gz
Refactor RPATH creation:
* Decreased complexity * Most rpath_* functions accept a FSTree structure now * Fewer calls to chdir() overall * Deeply nested libraries are detected * Libraries are no longer confined to lib/ and /lib64
Diffstat (limited to 'src/relocation.c')
-rw-r--r--src/relocation.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/relocation.c b/src/relocation.c
index 2ef72eb..c235abe 100644
--- a/src/relocation.c
+++ b/src/relocation.c
@@ -387,6 +387,7 @@ void relocate_root(const char *destroot, const char *baseroot) {
getcwd(cwd, sizeof(cwd));
chdir(baseroot);
{
+ FSTree *libs = rpath_libraries_available(".");
// Rewrite binary prefixes
b_record = prefixes_read(SPM_META_PREFIX_BIN);
if (b_record) {
@@ -395,7 +396,7 @@ void relocate_root(const char *destroot, const char *baseroot) {
if (SPM_GLOBAL.verbose) {
printf("Relocate RPATH: %s\n", b_record[i]->path);
}
- rpath_autoset(b_record[i]->path);
+ rpath_autoset(b_record[i]->path, libs);
}
if (SPM_GLOBAL.verbose) {
printf("Relocate DATA : %s\n", b_record[i]->path);