HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/1233/root/home/arjun/python-apt/tests/old/test_enhances.py
#!/usr/bin/python3

import apt

cache = apt.Cache()

for pkg in cache:
    if pkg.installed and pkg.installed.enhances:
        s = "%s enhances:" % pkg.name
        for or_list in pkg.installed.enhances:
            for enhances in or_list.or_dependencies:
                s += " %s" % enhances.name
                if enhances.name in cache and not cache[enhances.name].is_installed:
                    s += "(*missing*) "
                s += ","
            print(s[:-1])