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

Bug#571443: marked as done (Support using "in" operator to test whether a package is in the cache)



Your message dated Sat, 27 Feb 2010 17:49:25 +0000
with message-id <E1NlQn7-0002Oc-85@ries.debian.org>
and subject line Bug#571443: fixed in python-apt 0.7.93.2
has caused the Debian Bug report #571443,
regarding Support using "in" operator to test whether a package is in the cache
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.)


-- 
571443: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571443
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: python-apt
Version: 0.7.93.1
Severity: wishlist

Hi,

I'm using python-apt's apt_pkg.Cache class to determine which packages
are installed.  I have to use a try...except statement to check
whether a package is in the cache first, though, since using the "in"
operator to do so generates an exception:

 Python 2.5.5 (r255:77872, Feb  1 2010, 19:53:42) 
 [GCC 4.4.3] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import apt_pkg
 >>> apt_pkg.init()
 >>> cache = apt_pkg.Cache()
 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 >>> 'foo' in cache
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 TypeError: argument of type 'apt_pkg.Cache' is not iterable
 >>> 

I wish that this worked.

-- 
Matt                                            http://ftbfs.org/kraai



--- End Message ---
--- Begin Message ---
Source: python-apt
Source-Version: 0.7.93.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.93.2_amd64.deb
  to main/p/python-apt/python-apt-dbg_0.7.93.2_amd64.deb
python-apt-dev_0.7.93.2_all.deb
  to main/p/python-apt/python-apt-dev_0.7.93.2_all.deb
python-apt_0.7.93.2.dsc
  to main/p/python-apt/python-apt_0.7.93.2.dsc
python-apt_0.7.93.2.tar.gz
  to main/p/python-apt/python-apt_0.7.93.2.tar.gz
python-apt_0.7.93.2_amd64.deb
  to main/p/python-apt/python-apt_0.7.93.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 571443@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: RIPEMD160

Format: 1.8
Date: Sat, 27 Feb 2010 18:33:11 +0100
Source: python-apt
Binary: python-apt python-apt-dbg python-apt-dev
Architecture: source amd64 all
Version: 0.7.93.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)
 python-apt-dev - Python interface to libapt-pkg (development files)
Closes: 571443
Changes: 
 python-apt (0.7.93.2) unstable; urgency=low
 .
   [ Julian Andres Klode ]
   * Fix some places where the old API was still used:
     - apt/utils.py: Completely ported, previous one was old-API from Ubuntu.
     - apt/cache.py: Use the new progress classes instead of the old ones.
     - apt/package.py: Various smaller issues fixed, probably caused by merge.
   * utils/migrate-0.8.py:
     - Improve C++ parsing and add apt.progress.old to the modules, reduces
       false positives.
     - Ship the list of deprecated things in the apt_pkg and apt_inst modules
       inside the script itself, so we don't have to parse the source code
       anymore.
   * python:
     - Handle deprecated attributes and methods in the tp_gettattro slot, this
       allows us to easily warn if a deprecated function is used.
   * python/tagfile.cc:
     - Implement the iterator protocol in TagFile.
   * python/cache.cc:
     - Implement Cache.__len__() and Cache.__contains__() (Closes: #571443).
   * data/templates/Debian.info.in:
     - Replace the MatchURI with one that really matches something.
   * aptsources/distro.py:
     - Call lsb_release with -idrc instead of --all.
   * tests:
     - Fix aptsources tests to use local data files if available.
     - test_all.py: Use local modules instead of system ones if possible.
   * data/templates/*.in: Switch MirrorsFile to relative filenames.
     - setup.py: Copy the mirror lists to the build directory
     - aptsources/distinfo.py: Support relative filenames for MirrorsFile.
   * debian/rules:
     - Run tests during build time.
   * debian/python-apt.install:
     - Install utils/migrate-0.8.py to /usr/share/python-apt/.
 .
   [ Michael Vogt ]
   * apt/cache.py:
     - call install_progress.startUpdate()/finishUpdate() to keep
       compatibility with older code
   * apt/progress/base.py:
     - restore "self.statusfd, self.writefd" type, provide additional
       self.status_stream and self.write_stream file like objects
   * python/progress.cc:
     - try to call compatibility functions first, then new functions
Checksums-Sha1: 
 6cbb3b5f146aa19dd519823320f91a4e7b9afa92 1234 python-apt_0.7.93.2.dsc
 7ed39a95a75fae07f8b0cd9890badf22d0e4b1c6 271608 python-apt_0.7.93.2.tar.gz
 42a8c8f37aaa00306c60ab48f337de8290d034f8 672070 python-apt_0.7.93.2_amd64.deb
 d8dc406c3cbb100e40c65222bd9d41ee89d2dfa1 3478234 python-apt-dbg_0.7.93.2_amd64.deb
 409a8d78949aef7b76b2f0bd93c664bd41e335a4 22280 python-apt-dev_0.7.93.2_all.deb
Checksums-Sha256: 
 68086d02646b5890165def59fdecbd6c7d015258cafe0d092afffccb74a82744 1234 python-apt_0.7.93.2.dsc
 f6edf609bf7d191467094f6ee3339e9c9515ea8cf7bc86cd7013269201ede5be 271608 python-apt_0.7.93.2.tar.gz
 23f95f5756e9dca5903273a8198d6b9619ac7ed02be8380214f08191d1f289e7 672070 python-apt_0.7.93.2_amd64.deb
 6f454a1a620cfa11d86d0a248dd5639034c756a7c9736b33558a9c78a8f67115 3478234 python-apt-dbg_0.7.93.2_amd64.deb
 6a6bd835c616386f10c12da31eb7b31894d4a6d3e8ec845a5f535a9575f13f35 22280 python-apt-dev_0.7.93.2_all.deb
Files: 
 649f0165eb626c5fe036b75f3bda18a0 1234 python optional python-apt_0.7.93.2.dsc
 f23909563b727005b11490f43f801c83 271608 python optional python-apt_0.7.93.2.tar.gz
 5c83a860bb871427ed37afbac79b225f 672070 python optional python-apt_0.7.93.2_amd64.deb
 ef6235081ffb3e215a79bf0b5cc10957 3478234 debug extra python-apt-dbg_0.7.93.2_amd64.deb
 b265361a81133d0bc06883a94d38114e 22280 python optional python-apt-dev_0.7.93.2_all.deb

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

iEYEAREDAAYFAkuJWdAACgkQrCpf/gCCPsJe6gCfSOdLEebiK0AIxnuN+5wGQwzw
rPkAn23UkxDZpFkToFFyEPu7Z5SZYgA7
=vYxU
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: