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

Bug#578074: marked as done (python-apt: apt.cache.Cache.get_changes could be fasterCurrently the get_changes call requires to create several thounsands highlevel apt.package.Package instances just to check which changes aremarked.)



Your message dated Wed, 19 May 2010 16:12:50 +0000
with message-id <E1OElt4-0001fv-Jn@ries.debian.org>
and subject line Bug#578074: fixed in python-apt 0.7.95
has caused the Debian Bug report #578074,
regarding python-apt: apt.cache.Cache.get_changes could be fasterCurrently the get_changes call requires to create several thounsands highlevel apt.package.Package instances just to check which changes aremarked.
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.)


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

See the attached patch for a speed up.

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

Kernel: Linux 2.6.32-trunk-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-apt depends on:
ii  apt [libapt-pkg-libc6.9-6-4.8 0.7.25.3   Advanced front-end for dpkg
ii  apt-utils [libapt-inst-libc6. 0.7.25.3   APT utility programs
ii  libc6                         2.10.2-6   Embedded GNU C Library: Shared lib
ii  libgcc1                       1:4.4.3-7  GCC support library
ii  libstdc++6                    4.4.3-7    The GNU Standard C++ Library v3
ii  python                        2.5.4-9    An interactive high-level object-o
ii  python-central                0.6.16     register and build utility for Pyt

Versions of packages python-apt recommends:
ii  iso-codes                     3.15-1     ISO language, territory, currency,
ii  lsb-release                   3.2-23     Linux Standard Base version report
ii  python2.6                     2.6.5-1    An interactive high-level object-o

Versions of packages python-apt suggests:
ii  python-apt-dbg                0.7.94.2   Python interface to libapt-pkg (de
pn  python-apt-doc                <none>     (no description available)
ii  python-gtk2                   2.17.0-2   Python bindings for the GTK+ widge
ii  python-vte                    1:0.24.0-2 Python bindings for the VTE widget

-- no debconf information
=== modified file 'apt/cache.py'
--- apt/cache.py	2010-03-23 12:32:21 +0000
+++ apt/cache.py	2010-04-16 15:25:52 +0000
@@ -176,10 +176,14 @@
     def get_changes(self):
         """ Get the marked changes """
         changes = []
-        for pkg in self:
-            if (pkg.marked_upgrade or pkg.marked_install or pkg.marked_delete
-                or pkg.marked_downgrade or pkg.marked_reinstall):
-                changes.append(pkg)
+        for pkg_name in self._set:
+            cand = self._cache[pkg_name]
+            if (self._depcache.marked_install(cand) or \
+                self._depcache.marked_delete(cand) or \
+                self._depcache.marked_upgrade(cand) or \
+                self._depcache.marked_downgrade(cand) or \
+                self._depcache.marked_reinstall(cand)):
+                changes.append(self[pkg_name])
         return changes
 
     @deprecated_args


--- End Message ---
--- Begin Message ---
Source: python-apt
Source-Version: 0.7.95

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.95_amd64.deb
  to main/p/python-apt/python-apt-dbg_0.7.95_amd64.deb
python-apt-dev_0.7.95_all.deb
  to main/p/python-apt/python-apt-dev_0.7.95_all.deb
python-apt-doc_0.7.95_all.deb
  to main/p/python-apt/python-apt-doc_0.7.95_all.deb
python-apt_0.7.95.dsc
  to main/p/python-apt/python-apt_0.7.95.dsc
python-apt_0.7.95.tar.gz
  to main/p/python-apt/python-apt_0.7.95.tar.gz
python-apt_0.7.95_amd64.deb
  to main/p/python-apt/python-apt_0.7.95_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 578074@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: Wed, 19 May 2010 15:43:09 +0200
Source: python-apt
Binary: python-apt python-apt-doc python-apt-dbg python-apt-dev
Architecture: source amd64 all
Version: 0.7.95
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)
 python-apt-doc - Python interface to libapt-pkg (API documentation)
Closes: 578074 581831
Changes: 
 python-apt (0.7.95) unstable; urgency=low
 .
   [ Julian Andres Klode ]
   * apt/cache.py:
     - Make Cache.get_changes() much (~35x) faster (Closes: #578074).
     - Make Cache.req_reinstall_pkgs much faster as well.
     - Make Cache.get_providing_packages() about 1000 times faster.
     - Use has_versions and has_provides from apt_pkg.Package where possible.
   * apt/package.py:
     - Decode using utf-8 in installed_files (LP: #407953).
     - Fix fetch_source() to work when source name = binary name (LP: #552400).
     - Merge a patch from Sebastian Heinlein to make get_changelog() only
       check sources where source version >= binary version (Closes: #581831).
     - Add Version.source_version and enhance Sebastian's patch to make use
       of it, in order to find the best changelog for the package.
   * python:
     - Return bool instead of int to Python where possible, looks better.
     - Document every class, function, property.
   * python/cache.cc:
     - Check that 2nd argument to Cache.update() really is a SourceList object.
     - Fix PackageFile.not_automatic to use NotAutomatic instead of NotSource.
     - Add Package.has_versions to see which packages have at least one version,
       and Package.has_provides for provides.
     - Add rich compare methods to the Version object.
   * python/generic.cc:
     - Fix a memory leak when using old attribute names.
     - Map ArchiveURI property to archive_uri
   * python/progress.cc:
     - Do not pass arguments to InstallProgress.wait_child().
   * doc:
     - Update the long documentation.
   * debian/control:
     - Change priority to standard, keep -doc and -dev on optional.
   * utils/migrate-0.8.py:
     - Open files in universal newline support and pass filename to ast.parse.
     - Add has_key to the list of deprecated functions.
     - Don't abort if parsing failed.
     - do not require files to end in .py if they are passed on the command
       line or if they contain python somewhere in the shebang line.
 .
   [ Michael Vogt ]
   * apt/cache.py:
     - make cache open silent by default (use apt.progress.base.OpProgress)
   * tests/data/aptsources_ports/sources.list:
     - fix ports test-data
   * tests/test_apt_cache.py:
     - add simple test for basic cache/dependency iteration
Checksums-Sha1: 
 70214d6dfe385cf9f8ec3d06ffc0fa0d2aed75a6 1242 python-apt_0.7.95.dsc
 8537b061762502aa3e4025b96e72df0de06cc87a 293135 python-apt_0.7.95.tar.gz
 287a51a627353c528b8bfd69a3a9486b1deec52f 535010 python-apt_0.7.95_amd64.deb
 97b47f650ec5ed43cf83ef1d60df48e917626d8f 205050 python-apt-doc_0.7.95_all.deb
 794b1f5de6edfabe2285a62443131af658971858 3518136 python-apt-dbg_0.7.95_amd64.deb
 6dec16457bf6019d7344692a37a07a37c8fc6375 7308 python-apt-dev_0.7.95_all.deb
Checksums-Sha256: 
 b6ba2dadf23ff4c54cece533921ddf059f7b34fd04f9b91a1246228892160423 1242 python-apt_0.7.95.dsc
 5c4ce95f86ef8ac7f4fbfdc9bd6674f6545f99f5c76e889ff3e94d96d1d54481 293135 python-apt_0.7.95.tar.gz
 39744d62dfc5c84558d413428041e2f28bc9cf320ff25023cff6c4a8bb8a5d09 535010 python-apt_0.7.95_amd64.deb
 7a9dd07c4b7f3a7feb91df12b2ae880bb8dae0b2474bddb19ac392d95f5ad8be 205050 python-apt-doc_0.7.95_all.deb
 27ec94a12076be505b3bed9bcbdb025f6507f953302a23c990cddc16c97962b9 3518136 python-apt-dbg_0.7.95_amd64.deb
 4c3be36e55002cd179b86e15dc8a903c81ea72db33c1a119210baa27a89fb2d3 7308 python-apt-dev_0.7.95_all.deb
Files: 
 01951e22bac295d8c6c959d8a6f143c2 1242 python standard python-apt_0.7.95.dsc
 4e32429f8d95e908ad16fadc13bd45ba 293135 python standard python-apt_0.7.95.tar.gz
 36132b2341d495b05fd3fe8919ae0935 535010 python standard python-apt_0.7.95_amd64.deb
 ca2769c561cd0b9b0dd38e8b758d4360 205050 doc optional python-apt-doc_0.7.95_all.deb
 c4deafd3759d29e5aa1ea964feebba89 3518136 debug extra python-apt-dbg_0.7.95_amd64.deb
 b27efa4c87adca8fa5b40cf30383d16c 7308 python optional python-apt-dev_0.7.95_all.deb

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

iEYEAREDAAYFAkvz7Z8ACgkQrCpf/gCCPsKQyACgnHm3LcrFBS54dieicPHrQLXg
ZdYAnjBkYNGdIRca7w8xuXniyM5t70bb
=wBAV
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: