summaryrefslogtreecommitdiffstats
path: root/doc/examples/records.py
blob: b88ed75448c4304b4cdae0ff2594e7ff70b4977c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python3

import apt

cache = apt.Cache()

for pkg in cache:
    if not pkg.candidate.record:
        continue
    if "Task" in pkg.candidate.record:
        print(
            "Pkg {} is part of '{}'".format(
                pkg.name, pkg.candidate.record["Task"].split()
            )
        )
        # print pkg.candidateRecord