From da067b48311dfcdaa3f113ec549c15f3184decdc Mon Sep 17 00:00:00 2001 From: Valentin Niess Date: Mon, 14 Oct 2024 14:48:16 +0200 Subject: [PATCH] Fetch deps before patching RPATH --- python_appimage/appimage/relocate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python_appimage/appimage/relocate.py b/python_appimage/appimage/relocate.py index 78157c6..5a6e69e 100644 --- a/python_appimage/appimage/relocate.py +++ b/python_appimage/appimage/relocate.py @@ -94,6 +94,8 @@ def patch_binary(path, libdir, recursive=True): else: excluded = _excluded_libs + deps = ldd(path) # Fetch deps before patching RPATH. + ensure_patchelf() rpath = '\'' + system((PATCHELF, '--print-rpath', path)) + '\'' relpath = os.path.relpath(libdir, os.path.dirname(path)) @@ -102,7 +104,6 @@ def patch_binary(path, libdir, recursive=True): if rpath != expected: system((PATCHELF, '--set-rpath', expected, path)) - deps = ldd(path) for dep in deps: name = os.path.basename(dep) if name in excluded: