def print_summary()

in scripts/elf_ubuntu_dependency_analyzer.py [0:0]


def print_summary(packages, special_cases, missing_libraries, binary_path):
    """
    Print a summary of the dependencies for a binary.

    Args:
    packages (list): List of package tuples (package_name, full_package_name).
    special_cases (list): List of special case strings.
    missing_libraries (list): List of missing library names.
    binary_path (str): Path to the binary being analyzed.
    """
    print("\nSummary of runtime dependencies:")
    table = PrettyTable(['Category', 'Package/Library', 'Details'])
    table.align['Category'] = 'l'
    table.align['Package/Library'] = 'l'
    table.align['Details'] = 'l'

    categories = {
        'cloudberry-custom': 'Cloudberry Custom',
        'system-library': 'System Library',
    }

    for package_name, full_package_name in sorted(set(packages)):
        category = categories.get(package_name, 'System Package')
        table.add_row([category, package_name, full_package_name])

    print(table)

    if missing_libraries:
        print("\nMISSING LIBRARIES:")
        for lib in missing_libraries:
            print(f"  - {lib}")

    if special_cases:
        print("\nSPECIAL CASES:")
        for case in special_cases:
            print(f"  - {case}")