File: cattags

package info (click to toggle)
debtags 2.1.5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 960 kB
  • sloc: python: 479; sh: 67; makefile: 34
file content (14 lines) | stat: -rw-r--r-- 291 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/python3
import apt

def main():
    cache = apt.Cache()
    for pkg in cache:
        cand = pkg.candidate
        if not cand: continue
        tags = cand.record.get("Tag", None)
        if not tags: continue
        print(pkg.name, tags)

if __name__ == "__main__":
    main()