Your message dated Mon, 21 Oct 2013 19:20:23 +0000 with message-id <E1VYL1b-0000QP-Dm@franck.debian.org> and subject line Bug#712749: fixed in python-apt 0.9.0 has caused the Debian Bug report #712749, regarding Property to test for non-purged 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.) -- 712749: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712749 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: Property to test for non-purged
- From: martin f krafft <madduck@debian.org>
- Date: Wed, 19 Jun 2013 09:27:42 +0200
- Message-id: <20130619072742.GA2860@fishbowl.rw.madduck.net>
Package: python-apt Version: 0.8.9.1 Severity: wishlist Tags: patch A removed-but-not-purged package will have is_installed() evaluate to False. There seems to be no obvious way to test whether a package has just been removed, or also purged. Here's one, because a removed-but-not-purged has at least one entry in the installed_files list: # python -c "import apt; c=apt.Cache(); c.update(); c.open(); p=c['ruby1.8']; print p, p.installed, p.installed_files" <Package: name:'ruby1.8' id:1425> None [u''] # dpkg --purge ruby1.8 (Reading database ... 27904 files and directories currently installed.) Removing ruby1.8 ... Purging configuration files for ruby1.8 ... # python -c "import apt; c=apt.Cache(); c.update(); c.open(); p=c['ruby1.8']; print p, p.installed, p.installed_files" <Package: name:'ruby1.8' id:1425> None [] I leave it up to you to decide if this is the right approach: --- /usr/lib/python2.7/dist-packages/apt/package.py 2013-06-06 18:32:36.000000000 +0200 +++ /tmp/package.py 2013-06-19 09:27:10.185973295 +0200 @@ -985,6 +985,11 @@ return (self._pkg.current_ver is not None) @property + def is_purged(self): + """Return ``True`` if the package is purged (not just removed).""" + return not (self.is_installed or len(self.installed_files) > 0) + + @property def is_upgradable(self): """Return ``True`` if the package is upgradable.""" return (self.is_installed and -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Fle: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8ign Architectures: i386 Kernel: Linux 3.10-rc4-amd64 (SMP w/4 CP L Shell: /bin/sh linked to /bin/dash Versions of packages python-apt depends on: ii libapt-inst1.5 0.9.8.2 ii libapt-pkg4.12 0.9. ii libc6 2.17-5 ii libgcc1 1:4.8.1-3 ii libstdc++6 4.8.1-3 ii python 2.7.5-2 ii python-apt-common 0.8.9.1 Versions of packages python-apt recommends: ii iso-cndes 3.43-1 ii lsb-release 4.1+Debian12 ii xz-utils 5.1.1alpha+20120614-2 Versions of packages python-apt suggests: pn python-apt-dbg <none> pn python-apt-doc <none> ii python-gtk2 2.24.0-3+b1 ii python-vte 1:0.28.2-5 -- no debconf information -- .''`. martin f. krafft <madduck@d.o> Related projects: : :' : proud Debian developer http://debiansystem.info `. `'` http://people.debian.org/~madduck http://vcs-pkg.org `- Debian - when you have better things to do than fixing systemsAttachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
--- End Message ---
--- Begin Message ---
- To: 712749-close@bugs.debian.org
- Subject: Bug#712749: fixed in python-apt 0.9.0
- From: Julian Andres Klode <jak@debian.org>
- Date: Mon, 21 Oct 2013 19:20:23 +0000
- Message-id: <E1VYL1b-0000QP-Dm@franck.debian.org>
Source: python-apt Source-Version: 0.9.0 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. 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 712749@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@ftp-master.debian.org) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.8 Date: Mon, 21 Oct 2013 20:53:17 +0200 Source: python-apt Binary: python-apt python-apt-doc python-apt-dbg python-apt-dev python-apt-common python3-apt python3-apt-dbg Architecture: source amd64 all Version: 0.9.0 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-common - Python interface to libapt-pkg (locales) python-apt-dbg - Python interface to libapt-pkg (debug extension) python-apt-dev - Python interface to libapt-pkg (development files) python-apt-doc - Python interface to libapt-pkg (API documentation) python3-apt - Python 3 interface to libapt-pkg python3-apt-dbg - Python 3 interface to libapt-pkg (debug extension) Closes: 639022 671784 680891 680971 686403 686726 692484 712749 717859 717861 722961 723815 Changes: python-apt (0.9.0) unstable; urgency=low . [ Michael Vogt ] * some fixes from the "coverity" scan * merge from Ubuntu: - data/templates/Ubuntu.info.in: add "Saucy Salamander" to - debian/control: add "Multi-Arch: allowed" . [ Julian Andres Klode ] * Completely remove all old-API support code * Accept bytes object for file names (Closes: #680971) * aptsources/sourceslist.py - Document correct use of uniq and hide it using __all__ (Closes: #723815) - Correctly parse multiple options (LP: #1103200) * python/apt_pkgmodule.cc: - Fix documentation of version_compare (Closes: #680891) * python/cache.cc: - Set NoDelete=true when creating Policy, fixes segfault in destructor * apt/package.py: - Add a Package.has_config_files property (Closes: #712749) * tests: - Do not set dir::etc::sourceparts to /tmp * apt, aptsources: - Only call init_config() if not already initialized (Closes: #686403) * apt/debfile.py: - Pass strip_multi_arch=False to parse_depends. Patch by Michael, tests derived from the ones provided by the reporter. Closes: #717859. Closes: #717861. * doc/source/examples/dpkg-info.py: - Use apt_inst.DebFile (Closes: #671784) * doc/examples/*.py: - Update examples to the new API (Closes: #639022) * tests/old/*.py: - Update to new API as well * data/templates/Ubuntu.info.in: - Add "Trusty Thar" * debian/control: - Set Standards-Version to 3.9.4 . [ Jeremy Bicha ] * data/templates/Ubuntu.info.in: add 'devel' series (Closes: #722961) . [ Jakub Wilk ] * python-apt: formatting error in library/index.rst (Closes: #692484) . [ Daniel Hartwig ] * apt/package.py: - mark_upgrade misuses FromUser to set auto-installed (Closes: #686726) Checksums-Sha1: c1e7e0df77969c9e268b03717a7916debcd3c406 1600 python-apt_0.9.0.dsc bbcb5eb5cb049cb1466da68be56ab7b5f5a88686 396035 python-apt_0.9.0.tar.gz 155800db08b7f4e7074c51728f354e0028bc843f 161520 python-apt_0.9.0_amd64.deb 69fb6295809e7b458960b5bdca8bcf5cec79d602 174144 python-apt-doc_0.9.0_all.deb 645febd0d0b52e4751474055f812333e05b6d313 1240196 python-apt-dbg_0.9.0_amd64.deb 6c5465559f745bfeca6aeb3ea40a706c6fc43986 7284 python-apt-dev_0.9.0_all.deb ecce4aa8dd478a06b1d31e70711bcf4d3f1a5e2a 85790 python-apt-common_0.9.0_all.deb 2f45298146c0c87d4986bd8285e6f5cc97ed228b 159084 python3-apt_0.9.0_amd64.deb 11b366b758a0f1fb28ffbc869760913974fd2673 1240034 python3-apt-dbg_0.9.0_amd64.deb Checksums-Sha256: 1a507367824cac9cd1ede4a5a63a7088e83f99370d0c85401a09f5da4bdb6103 1600 python-apt_0.9.0.dsc 44e6d6c56c281d64e5b305b96816f855af007a60383a37fa977d02085e6fff5b 396035 python-apt_0.9.0.tar.gz 57ee42453c7925d972868ab1066ba9e831f6570208e41b8800ba12a7b9eff850 161520 python-apt_0.9.0_amd64.deb dc88deaf1a69cf4b23e99bd5c1722bf48c0258e2a3ee39b171d066a3c3217be7 174144 python-apt-doc_0.9.0_all.deb 529a9d8d72b29f41cd93044534b70c43db5f9db7a8a255499bd4f021d916c7be 1240196 python-apt-dbg_0.9.0_amd64.deb 8b543a333aa4fcf1bfe907f61fb6c8dde2db68255a1c30290015a9f038e20dc4 7284 python-apt-dev_0.9.0_all.deb 0fc0a230066f473818f46e16e1dbeea1093ae9c5f3f668f3e54300a2ec910738 85790 python-apt-common_0.9.0_all.deb 73e1022b6114c76b82f488fe883f1284e301aa5f5384f6c95be0d430d03a20b6 159084 python3-apt_0.9.0_amd64.deb 3eeb4f639bd10306e8598d0faee8bd2e16b963b50a82d1caad81872baa7ca37f 1240034 python3-apt-dbg_0.9.0_amd64.deb Files: 71f98c71e5aa6fe186c55a2d811de458 1600 python standard python-apt_0.9.0.dsc fdad82a8de0e0729a521a0ea13be7e25 396035 python standard python-apt_0.9.0.tar.gz 8f9f50cd545365ba2bae82de2973492e 161520 python standard python-apt_0.9.0_amd64.deb e657bc565a438c2963ae8c489740386c 174144 doc optional python-apt-doc_0.9.0_all.deb 6e1dcbac7cb0827e63511be781bf8e75 1240196 debug extra python-apt-dbg_0.9.0_amd64.deb 85fedf530c1e41fb3825edd4969bbb6a 7284 python optional python-apt-dev_0.9.0_all.deb 0bd23ef9c5bdc2ed5093fb7bc5baa4bc 85790 python optional python-apt-common_0.9.0_all.deb 47434c77a417d83eedc60752e681a52a 159084 python optional python3-apt_0.9.0_amd64.deb 8f99630cba286f201aed80f62f069528 1240034 debug extra python3-apt-dbg_0.9.0_amd64.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iEYEARECAAYFAlJlfE0ACgkQrCpf/gCCPsL1zwCeMX5A+0o4CCyK9Uk0y/BAg9ek DtgAoJeBpNQYo7nwPjJKEXiWO+NRfZVp =ehPg -----END PGP SIGNATURE-----
--- End Message ---