From 57301606f77b960093c25a0d4c2610efae80b431 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Fri, 4 Dec 2020 13:24:26 +0000 Subject: [PATCH] build-relocatable-install: Don't wrap steam-runtime-system-info If we wrap steam-runtime-system-info in a shell script, its argv[0] will be ld.so, which makes it fail to find its own relocatable prefix in _srt_find_myself(). Signed-off-by: Simon McVittie <smcv@collabora.com> --- pressure-vessel/build-relocatable-install.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pressure-vessel/build-relocatable-install.py b/pressure-vessel/build-relocatable-install.py index 67d181232..43ff05f34 100755 --- a/pressure-vessel/build-relocatable-install.py +++ b/pressure-vessel/build-relocatable-install.py @@ -84,7 +84,6 @@ DEPENDENCIES = { # program to install => binary package WRAPPED_PROGRAMS = { 'bwrap': 'bubblewrap', - 'steam-runtime-system-info': 'steam-runtime-tools-bin', } PRIMARY_ARCH_DEPENDENCIES = { 'bubblewrap': 'bubblewrap', @@ -109,6 +108,7 @@ EXECUTABLES = [ 'pressure-vessel-launcher', 'pressure-vessel-try-setlocale', 'pressure-vessel-wrap', + 'steam-runtime-system-info', ] LIBCAPSULE_TOOLS = [ 'capsule-capture-libs', @@ -275,10 +275,15 @@ def main(): ) for exe in EXECUTABLES: - install_exe( - os.path.join(args.pv_dir, 'bin', exe), - os.path.join(installation, 'bin'), - ) + path = os.path.join(args.pv_dir, 'bin', exe) + + if not os.path.exists(path): + path = os.path.join(args.prefix, 'bin', exe) + + if not os.path.exists(path): + path = '/usr/bin/{}'.format(exe) + + install_exe(path, os.path.join(installation, 'bin')) install( os.path.join(args.srcdir, 'pressure-vessel', 'THIRD-PARTY.md'), -- GitLab