commit: f0b893136c4b1418edadff6ff8e65afe68c3b4a8
Author: Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Mon Apr 19 04:56:03 2021 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Apr 19 04:56:03 2021 +0000
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=f0b89313
lddtree: respect (destination) root with --argv0 interp probing
This is important because the path in this func reflects where the
interpreter is going to be living, not where it's being copied from.
These are often the same paths (relatively speaking), but when we're
copying from a cross-compiler sysroot, or when using --libdir so the
target paths are rewritten, the interp path probably does not line
up with whatever happens to live in the active rootfs.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
lddtree.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lddtree.py b/lddtree.py
index b8fde0c..dd17387 100755
--- a/lddtree.py
+++ b/lddtree.py
@@ -157,7 +157,7 @@ def GenerateLdsoWrapper(root, path, interp, libpaths=()):
interp_name),
'libpaths': ':'.join(['${basedir}/' + os.path.relpath(p, basedir)
for p in libpaths]),
- 'argv0_arg': '--argv0 "$0"' if interp_supports_argv0(interp) else '',
+ 'argv0_arg': '--argv0 "$0"' if interp_supports_argv0(root + interp)
else '',
}
wrapper = """#!/bin/sh
if ! base=$(realpath "$0" 2>/dev/null); then