MCPcopy Create free account
hub / github.com/apache/cloudberry / is_elf_binary

Function is_elf_binary

devops/tools/elf_ubuntu_dependency_analyzer.py:198–209  ·  view source on GitHub ↗

Check if a file is an ELF binary. Args: file_path (str): Path to the file. Returns: bool: True if the file is an ELF binary, False otherwise.

(file_path)

Source from the content-addressed store, hash-verified

196 return packages, special_cases, missing_libraries
197
198def is_elf_binary(file_path):
199 """
200 Check if a file is an ELF binary.
201
202 Args:
203 file_path (str): Path to the file.
204
205 Returns:
206 bool: True if the file is an ELF binary, False otherwise.
207 """
208 file_output = run_command(['file', file_path])
209 return 'ELF' in file_output and ('executable' in file_output or 'shared object' in file_output)
210
211def print_grand_summary(grand_summary, grand_special_cases, grand_missing_libraries):
212 """

Callers 1

analyze_pathFunction · 0.70

Calls 1

run_commandFunction · 0.70

Tested by

no test coverage detected