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

Bug#523801: marked as done (Returns invalid Version objects on packages without candidate versions)



Your message dated Sun, 12 Apr 2009 17:48:24 +0000
with message-id <E1Lt3n6-0002Dj-96@ries.debian.org>
and subject line Bug#523801: fixed in python-apt 0.7.10.2
has caused the Debian Bug report #523801,
regarding Returns invalid Version objects on packages without candidate versions
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
523801: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523801
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- 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 ---
Source: python-apt
Source-Version: 0.7.10.2

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.2_amd64.deb
  to pool/main/p/python-apt/python-apt-dbg_0.7.10.2_amd64.deb
python-apt_0.7.10.2.dsc
  to pool/main/p/python-apt/python-apt_0.7.10.2.dsc
python-apt_0.7.10.2.tar.gz
  to pool/main/p/python-apt/python-apt_0.7.10.2.tar.gz
python-apt_0.7.10.2_amd64.deb
  to pool/main/p/python-apt/python-apt_0.7.10.2_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:00:07 +0200
Source: python-apt
Binary: python-apt python-apt-dbg
Architecture: source amd64
Version: 0.7.10.2
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.2) unstable; urgency=low
 .
   * apt/package.py: Handle cases where no candidate is available and
     one of the deprecated properties (e.g. candidateVersion) is
     requested. (Closes: #523801)
   * setup.py, debian/rules: Support version in setup.py again by getting
     the value from the variable DEBVER (defined in debian/rules), falling
     back to None.
Checksums-Sha1: 
 00828ac6359a507a67c98436b58985f95ea722ef 1194 python-apt_0.7.10.2.dsc
 996bdf6c69e4e7a6a708a9077728c0eb65240369 679327 python-apt_0.7.10.2.tar.gz
 ded8f97d42203df38c0babe77bab901abbdac6da 398034 python-apt_0.7.10.2_amd64.deb
 29625928b82d01cccf7e5add1f4385c3da91d14a 1491504 python-apt-dbg_0.7.10.2_amd64.deb
Checksums-Sha256: 
 deb31c654cee6b552967213fe749a962fa9f9d5820cb8e511448093fe505ae71 1194 python-apt_0.7.10.2.dsc
 3c9dae9575043740768aa5e411d539a7d15f264e19c0a0c0104846ec337b1752 679327 python-apt_0.7.10.2.tar.gz
 df575e425b6a8255ef9c1128eca3798aade2acb549f2e25a0fdeebab880e97a2 398034 python-apt_0.7.10.2_amd64.deb
 800a6c61b6f1f193d97cf8d1d31892e731a61a91319a94a9bf731dbb8a5e2d02 1491504 python-apt-dbg_0.7.10.2_amd64.deb
Files: 
 533f70dc5cbdf2d271a6b23f777fd71d 1194 python optional python-apt_0.7.10.2.dsc
 bf69051d194f3d92a6533f174c9301cc 679327 python optional python-apt_0.7.10.2.tar.gz
 d7a7bccd696be8d7e4048b7b67f85752 398034 python optional python-apt_0.7.10.2_amd64.deb
 a08fb086b836b56727ca3bdc007ac23e 1491504 debug extra python-apt-dbg_0.7.10.2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkniIRoACgkQrCpf/gCCPsLVtACgsnRUSYKvm5n4AZBWEPh0P8eT
hTYAmgMlGwlEBC9Nu5XlXChOTqHLZ36d
=20iZ
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: