Skip to content

Commit da067b4

Browse files
committed
Fetch deps before patching RPATH
1 parent efc41b6 commit da067b4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎python_appimage/appimage/relocate.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def patch_binary(path, libdir, recursive=True):
9494
else:
9595
excluded = _excluded_libs
9696

97+
deps = ldd(path) # Fetch deps before patching RPATH.
98+
9799
ensure_patchelf()
98100
rpath = '\'' + system((PATCHELF, '--print-rpath', path)) + '\''
99101
relpath = os.path.relpath(libdir, os.path.dirname(path))
@@ -102,7 +104,6 @@ def patch_binary(path, libdir, recursive=True):
102104
if rpath != expected:
103105
system((PATCHELF, '--set-rpath', expected, path))
104106

105-
deps = ldd(path)
106107
for dep in deps:
107108
name = os.path.basename(dep)
108109
if name in excluded:

0 commit comments

Comments
 (0)