Hi,

thanks for your bugreort.

To make it work, please use:

import apt_pkg
apt_pkg.InitConfig()
apt_pkg.InitSystem()
cache=apt_pkg.GetCache()
depcache=apt_pkg.GetDepCache(cache)
for pkg in cache.Packages:
    if pkg.CurrentVer and depcache.IsAutoInstalled(pkg):
        print pkg.Name

Or the high level bindings (that is recommended):

import apt
cache = apt.Cache()
for pkg in cache:
    if pkg.is_auto_installed:
       print pkg.name

I need to investigate why the flag is wrong, but IIRC its a property
of the depcache, not the pkgcache

Cheers,
 Michael



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to