Skip to content

Commit 8973e28

Browse files
committed
fix: require strace from the generate method
related to #74
1 parent 85f6903 commit 8973e28

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

appimagebuilder/generator/app_runtime_analyser.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
import subprocess
1818

1919
from appimagebuilder.commands.patchelf import PatchElf, PatchElfError
20+
from appimagebuilder.common import shell
21+
22+
DEPENDS_ON = ["strace", "patchelf"]
2023

2124

2225
class AppRuntimeAnalyser:
@@ -28,14 +31,13 @@ def __init__(self, app_dir, bin, args):
2831
self.runtime_bins = set()
2932
self.runtime_data = set()
3033
self.logger = logging.getLogger("AppRuntimeAnalyser")
34+
self._deps = shell.resolve_commands_paths(DEPENDS_ON)
3135

3236
def run_app_analysis(self):
3337
self.runtime_libs.clear()
38+
command = "{strace} -f -e trace=openat -E LD_DEBUG=libs {bin} {args}"
39+
command = command.format(bin=self.bin, args=self.args, **self._deps)
3440

35-
command = "strace -f -e trace=openat -E LD_DEBUG=libs %s %s" % (
36-
self.bin,
37-
self.args,
38-
)
3941
self.logger.info(command)
4042
output = subprocess.run(command, stderr=subprocess.PIPE, shell=True)
4143

0 commit comments

Comments
 (0)