On Fri, Mar 25, 2011 at 10:57:03AM +0100, Patrick Schoenfeld wrote: > Package: python-apt > Severity: wishlist > > Hi, > > currently the python-apt bindings for the apt package cache do not > provide access to the task associated with a package. I have a use-case > where I need it. > > The information can be gathered from the Packages file, > where for each Package, which is a member of a task, a key-value pair > "Task: foo" is stored. > > It would be nice if python-apt provided a method task > in apt.packagePackage() objects. Apart from this it would be nice to > have functions in the cache object to access list of tasks and > associated packages.. Use Version.record["Task"].split(): >>> import apt >>> apt.Cache()["gnome"].candidate.record["Task"].split() ['gnome-desktop'] The tasks are not in the cache, and this is easy enough, so I don't think we need an extra method for it. -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Attachment:
pgpTlSq9tgszY.pgp
Description: PGP signature