summaryrefslogtreecommitdiff
path: root/doc/examples/records.py
blob: 681eac0c5c5b6de363d0e367a8375baad4cb7d09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python

import apt

cache = apt.Cache()

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