alle Pakete eines Repositories ansehen

Sebastian Heinlein glatzor at ubuntu.com
Son Jun 24 09:35:59 BST 2007


Am Samstag, den 23.06.2007, 19:08 +0200 schrieb Simon Jolle:
> Hallo Liste
> 
> Wie kann ich alle Pakete eines Repositories (z.B
> feisty-commercial/main) ansehen? Ich möchte dies weder per GUI noch
> per Webbrowser tun. Ähnlich "up2date --show-available" oder "yum list"

Geht mit einem kleinen Python-Skript:

#!/usr/bin/env python
import apt
cache = apt.Cache()
for pkg in cache.keys():
    for origin in cache[pkg].candidateOrigin:
        if origin.__dict__["component"] == "main" and \
           origin.__dict__["archive"] == "feisty-commercial":
            print cache[pkg].name
            break