[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#565364: python-apt: Auto flag attribute in apt_get.Package is always 0



Package: python-apt
Version: 0.7.13.3
Severity: normal

Run this code:

import apt_pkg

apt_pkg.InitConfig()
apt_pkg.InitSystem()
cache=apt_pkg.GetCache()

for pkg in cache.Packages:
    if pkg.CurrentVer and pkg.Auto != 0:
        print pkg.Name

This prints only:
Reading package lists... Done
Building dependency tree       
Reading state information... Done

You'd expect it to print at least one package on a normal system.

For example, look at a short excerpt from my /var/lib/apt/extended_states:

Package: python2.4
Auto-Installed: 1

Package: gcc-4.3
Auto-Installed: 1

Package: cpp
Auto-Installed: 1

Package: libgmp3c2
Auto-Installed: 1

Package: gcc
Auto-Installed: 0

So at least python2.4, gcc-4.3, cpp, and libgmp3c2 should be listed.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-apt depends on:
ii  apt [libapt-pkg-libc6.9-6-4. 0.7.25      Advanced front-end for dpkg
ii  apt-utils [libapt-inst-libc6 0.7.25      APT utility programs
ii  libc6                        2.10.2-2    GNU C Library: Shared libraries
ii  libgcc1                      1:4.4.2-3   GCC support library
ii  libstdc++6                   4.4.2-3     The GNU Standard C++ Library v3
ii  lsb-release                  3.2-23      Linux Standard Base version report
ii  python                       2.5.4-4     An interactive high-level object-o
ii  python-central               0.6.14+nmu2 register and build utility for Pyt

Versions of packages python-apt recommends:
ii  iso-codes                     3.12-1     ISO language, territory, currency,
ii  libjs-jquery                  1.3.3-2    JavaScript library for dynamic web

Versions of packages python-apt suggests:
pn  python-apt-dbg                <none>     (no description available)
ii  python-gtk2                   2.16.0-1   Python bindings for the GTK+ widge
pn  python-vte                    <none>     (no description available)

-- no debconf information



Reply to: