--- Begin Message ---
Package: python-apt
Version: 0.7.10.1
Severity: critical
Hello,
I'm setting the severity to 'critical' because it causes several other
packages to break, including goplay, ept-cache and basically anything
that uses or recommends apt-xapian-index (see #521346, #523737 and
#523747).
I'm attaching a short test case. When run on a system which contains a
package in status 'config-files' and with no information in the apt
database, package.candidate gives a version object that throws on every
single method.
I assume that this is a bug: in a normal API, I would expect to get None
when asking for a candidate version: in fact, there is None.
# dpkg -s bist
Package: bist
Status: deinstall ok config-files
Priority: optional
Section: science
Installed-Size: 2664
Maintainer: David Paleino <d.paleino@gmail.com>
[...]
$ ./testcase.py
Looking for the situation that annoys Enrico...
Enrico is annoyed by the behaviour of python-apt on bist
Traceback (most recent call last):
File "./testcase2.py", line 16, in <module>
dummy = ver.raw_description
File "/usr/lib/python2.5/site-packages/apt/package.py", line 257, in raw_description
return self._records.LongDesc
File "/usr/lib/python2.5/site-packages/apt/package.py", line 214, in _records
if self.package._pcache._records.Lookup(self._cand.FileList[0]):
AttributeError: 'NoneType' object has no attribute 'FileList'
I would rather not have to work around this by wrapping every read of a
property of Version in try/except, and I wish you can fix this soon,
because I'm getting several nasty bug reports.
If you cannot/won't fix it soon, at least let me know. Please don't
leave me hanging with a nonfunctional package and no answer for a month
like you did with #513315.
Best of all,
Enrico
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-apt depends on:
ii apt [libapt-pkg-libc6.7-6-4.6 0.7.20.2 Advanced front-end for dpkg
ii apt-utils [libapt-inst-libc6. 0.7.20.2 APT utility programs
ii libc6 2.9-7 GNU C Library: Shared libraries
ii libgcc1 1:4.3.3-5 GCC support library
ii libjs-jquery 1.3.2-2 JavaScript library for dynamic web
ii libstdc++6 4.3.3-5 The GNU Standard C++ Library v3
ii lsb-release 3.2-22 Linux Standard Base version report
ii python 2.5.4-2 An interactive high-level object-o
ii python-central 0.6.11 register and build utility for Pyt
Versions of packages python-apt recommends:
pn iso-codes <none> (no description available)
Versions of packages python-apt suggests:
pn python-apt-dbg <none> (no description available)
pn python-gtk2 <none> (no description available)
pn python-vte <none> (no description available)
-- no debconf information
#!/usr/bin/python
# Try to reproduce the python-apt problem behind #523737, #523747 and #521346
import apt, sys
print "Looking for the situation that annoys Enrico..."
cache = apt.Cache(memonly=True)
for pkg in cache:
ver = pkg.candidate
if ver is None:
print >>sys.stderr, name, "has no candidate version"
sys.exit(0)
# python-apt should not raise an exception at this point
try:
dummy = ver.raw_description
except:
print "Enrico is annoyed by the behaviour of python-apt on", pkg.name
raise
print "You don't have any packages that cause python-apt to annoy Enrico"
--- End Message ---
--- Begin Message ---
- To: 523801-close@bugs.debian.org
- Subject: Bug#523801: fixed in python-apt 0.7.10.3
- From: Julian Andres Klode <jak@debian.org>
- Date: Sun, 12 Apr 2009 18:17:10 +0000
- Message-id: <E1Lt4Ew-0004hG-Fi@ries.debian.org>
Source: python-apt
Source-Version: 0.7.10.3
We believe that the bug you reported is fixed in the latest version of
python-apt, which is due to be installed in the Debian FTP archive:
python-apt-dbg_0.7.10.3_amd64.deb
to pool/main/p/python-apt/python-apt-dbg_0.7.10.3_amd64.deb
python-apt_0.7.10.3.dsc
to pool/main/p/python-apt/python-apt_0.7.10.3.dsc
python-apt_0.7.10.3.tar.gz
to pool/main/p/python-apt/python-apt_0.7.10.3.tar.gz
python-apt_0.7.10.3_amd64.deb
to pool/main/p/python-apt/python-apt_0.7.10.3_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 523801@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Julian Andres Klode <jak@debian.org> (supplier of updated python-apt package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sun, 12 Apr 2009 19:50:26 +0200
Source: python-apt
Binary: python-apt python-apt-dbg
Architecture: source amd64
Version: 0.7.10.3
Distribution: unstable
Urgency: low
Maintainer: APT Development Team <deity@lists.debian.org>
Changed-By: Julian Andres Klode <jak@debian.org>
Description:
python-apt - Python interface to libapt-pkg
python-apt-dbg - Python interface to libapt-pkg (debug extension)
Closes: 523801
Changes:
python-apt (0.7.10.3) unstable; urgency=low
.
* apt/package.py: Handle cases where no candidate is available, by returning
None in the candidate property. (Closes: #523801)
Checksums-Sha1:
d2b3524d3b86577b743293fccfdb305a1e66b9d6 1194 python-apt_0.7.10.3.dsc
a5c9a3c5733521c98cca8737d9597a61b607dd86 679291 python-apt_0.7.10.3.tar.gz
eada05adb1fc6ea24dd273bcc085ef17272d4144 397790 python-apt_0.7.10.3_amd64.deb
d1ce92ba8ccfa740333cd3c106092a0db883b5d4 1491528 python-apt-dbg_0.7.10.3_amd64.deb
Checksums-Sha256:
931c5fa6800852011bb37742042dd3303956c1f6405c089b9454e95adf3ad690 1194 python-apt_0.7.10.3.dsc
77435722721f5eeeeced1a968643d61d1b5b093a2e8c4f1a197812c0ab559a51 679291 python-apt_0.7.10.3.tar.gz
d8dbe744d7d5a2113936f6be64db9b78037601c0e9e41eff731e078beee3a0c9 397790 python-apt_0.7.10.3_amd64.deb
7bf26831a8f2baccb4214ca9b9d89eff671975c4545b349cf51f63f736adc092 1491528 python-apt-dbg_0.7.10.3_amd64.deb
Files:
89b049dd5a8e98c6f20b71eb46265340 1194 python optional python-apt_0.7.10.3.dsc
339e75a49ea19c3bae7d2af620c630e2 679291 python optional python-apt_0.7.10.3.tar.gz
71dd9e5507cd06e97c369c55ea7afd7f 397790 python optional python-apt_0.7.10.3_amd64.deb
c33e712912e4e518b47159ad9f111440 1491528 debug extra python-apt-dbg_0.7.10.3_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkniK60ACgkQrCpf/gCCPsIKMwCgtFXMgTgptjIYZ6gNE0JQpJG7
W0MAoJABW0WMrsA7ckxog3EcvV5iwuxF
=wk+G
-----END PGP SIGNATURE-----
--- End Message ---