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

Bug#572596: marked as done (python-apt: TagSection corruption when iterating through a TagFile)



Your message dated Wed, 10 Mar 2010 18:47:25 +0000
with message-id <E1NpQwH-0007m3-EE@ries.debian.org>
and subject line Bug#572596: fixed in python-apt 0.7.94
has caused the Debian Bug report #572596,
regarding python-apt: TagSection corruption when iterating through a TagFile
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.)


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

Hello,

While trying to convert deb822 in python-debian to use the TagParser
iterator API (rather than an ugly hack to avoid using shared storage), I
ran into this little bug.  It seems that after somewhere between 30 or
40 paragraphs (I assume this depends on the size of the paragraphs), old
section instances become corrupt.

Here's a reproducer:

#!/usr/bin/python

import apt_pkg; apt_pkg.init()
from debian_bundle import deb822

deb822_objs = list(deb822.Deb822.iter_paragraphs(open("/tmp/test_Packages"),
                                                 use_apt_pkg=False))

def test_keys(iter1, iter2):
    iter1 = iter(iter1)
    for section in iter2:
        d = iter1.next()
        if section.keys() != d.keys():
            print "key mismatch:", section.keys(), "!=", d.keys()

# This prints nothing
print "Testing while iterating"
test_keys(deb822_objs, apt_pkg.TagFile(open("/tmp/test_Packages")))

# This has errors, apt_pkg data is corrupt
print "Testing after making a list from the iterator"
test_keys(deb822_objs, list(apt_pkg.TagFile(open("/tmp/test_Packages"))))

# This doesn't have an error for me
print "Testing after making a list out of only the first 30 entries"
shorter = []
sections = iter(apt_pkg.TagFile(open("/tmp/test_Packages")))
for i in range(30):
    shorter.append(sections.next())
test_keys(deb822_objs, shorter)

# This doesn't have an error for me
print "Testing after making a list out of only the first 35 entries"
shorter = []
sections = iter(apt_pkg.TagFile(open("/tmp/test_Packages")))
for i in range(35):
    shorter.append(sections.next())
test_keys(deb822_objs, shorter)


If I run it on test_Packages from #571470 [1], I get output like:

Testing while iterating
Testing after making a list from the iterator
key mismatch: ['Package', 'pliance-checker\nPri', 'ority', '\nSection', 'alled-Size', '@gmail.com>\nArchit', 'ecture', 'sion', ' pool/main/a', '/abi-compliance-checker/abi-compliance-ch', 'ecker_1.6-1_all.deb\nSize', '4a3436442d147c3af44f98a66\nSHA1', 'SHA256', ' by examining the shared objects\n (.so) files themselves,'] != ['Package', 'Priority', 'Section', 'Installed-Size', 'Maintainer', 'Architecture', 'Version', 'Filename', 'Size', 'MD5sum', 'SHA1', 'SHA256', 'Description', 'Tag']
 <lots of similar messages, up to...>
key mismatch: ['le with a variety of plugi', 'ns.\n .\n This packag', 'e includes many of', ' the available impor', 't/export plugins allowing\n AbiWord to interact with ODT, WordPerfect, and other formats.  It also\n inclu', 'des tools plugins, o', 'ffering live co', 'llaboration with A', 'biWord users\n on Linux and Windows (using', ' TCP or Jabber/XMPP), web translation and', '\n dictionary support, and more.\n .\n Additional plugin', 's that require significant amounts of extr', 'a software to\n function are in the various abiword-plugin-* packa', 'ges.\nHomepag', 'e', 'ce', 'oolkit', 'with-format', 'Homepage', 'Tag'] != ['Package', 'Priority', 'Section', 'Installed-Size', 'Maintainer', 'Architecture', 'Source', 'Version', 'Replaces', 'Provides', 'Depends', 'Conflicts', 'Filename', 'Size', 'MD5sum', 'SHA1', 'SHA256', 'Description', 'Homepage', 'Tag']
Testing after making a list out of only the first 30 entries
Testing after making a list out of only the first 35 entries
key mismatch: ['Package', 'pliance-checker\nPri', 'ority', '\nSection', 'alled-Size', '@gmail.com>\nArchit', 'ecture', 'sion', ' pool/main/a', '/abi-compliance-checker/abi-compliance-ch', 'ecker_1.6-1_all.deb\nSize', '4a3436442d147c3af44f98a66\nSHA1', 'SHA256', ' by examining the shared objects\n (.so) files themselves,'] != ['Package', 'Priority', 'Section', 'Installed-Size', 'Maintainer', 'Architecture', 'Version', 'Filename', 'Size', 'MD5sum', 'SHA1', 'SHA256', 'Description', 'Tag']
 <lots of similar messages, up to...>
key mismatch: ['le with a variety of plugi', 'ns.\n .\n This packag', 'e includes many of', ' the available impor', 't/export plugins allowing\n AbiWord to interact with ODT, WordPerfect, and other formats.  It also\n inclu', 'des tools plugins, o', 'ffering live co', 'llaboration with A', 'biWord users\n on Linux and Windows (using', ' TCP or Jabber/XMPP), web translation and', '\n dictionary support, and more.\n .\n Additional plugin', 's that require significant amounts of extr', 'a software to\n function are in the various abiword-plugin-* packa', 'ges.\nHomepag', 'e', 'ce', 'oolkit', 'with-format', 'Homepage', 'Tag'] != ['Package', 'Priority', 'Section', 'Installed-Size', 'Maintainer', 'Architecture', 'Source', 'Version', 'Replaces', 'Provides', 'Depends', 'Conflicts', 'Filename', 'Size', 'MD5sum', 'SHA1', 'SHA256', 'Description', 'Homepage', 'Tag']

 [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=test_Packages;att=1;bug=571470

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

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

Versions of packages python-apt depends on:
ii  apt [libapt-pkg-libc6.9-6-4. 0.7.25      Advanced front-end for dpkg
ii  apt-utils [libapt-inst-libc6 0.7.25      APT utility programs
ii  libc6                        2.10.2-4    Embedded GNU C Library: Shared lib
ii  libgcc1                      1:4.4.2-8   GCC support library
ii  libstdc++6                   4.4.2-8     The GNU Standard C++ Library v3
ii  python                       2.5.4-5     An interactive high-level object-o
ii  python-central               0.6.14+nmu2 register and build utility for Pyt
ii  python2.6                    2.6.2-2     An interactive high-level object-o

Versions of packages python-apt recommends:
ii  iso-codes                     3.12.1-1   ISO language, territory, currency,
ii  libjs-jquery                  1.3.3-2    JavaScript library for dynamic web
ii  lsb-release                   3.2-23     Linux Standard Base version report

Versions of packages python-apt suggests:
pn  python-apt-dbg                <none>     (no description available)
ii  python-gtk2                   2.16.0-1   Python bindings for the GTK+ widge
ii  python-vte                    1:0.22.5-1 Python bindings for the VTE widget

-- no debconf information



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

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.94_amd64.deb
  to main/p/python-apt/python-apt-dbg_0.7.94_amd64.deb
python-apt-dev_0.7.94_all.deb
  to main/p/python-apt/python-apt-dev_0.7.94_all.deb
python-apt-doc_0.7.94_all.deb
  to main/p/python-apt/python-apt-doc_0.7.94_all.deb
python-apt_0.7.94.dsc
  to main/p/python-apt/python-apt_0.7.94.dsc
python-apt_0.7.94.tar.gz
  to main/p/python-apt/python-apt_0.7.94.tar.gz
python-apt_0.7.94_amd64.deb
  to main/p/python-apt/python-apt_0.7.94_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 572596@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, 10 Mar 2010 16:10:27 +0100
Source: python-apt
Binary: python-apt python-apt-doc python-apt-dbg python-apt-dev
Architecture: source amd64 all
Version: 0.7.94
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: 572596 572617 572998
Changes: 
 python-apt (0.7.94) unstable; urgency=low
 .
   * Move documentation into python-apt-doc (Closes: #572617)
   * Build documentation only once on the default Python version.
   * python/acquire-item.cc:
     - Add AcquireItem.partialsize member.
   * python/apt_pkgmodule.cc:
     - Treat '>>' and '>', '<<' and '<' as identical in check_dep (LP: #535667).
   * python/generic.cc:
     - Map UntranslatedDepType to dep_type_untranslated.
   * python/tag.cc:
     - Hack the TagFile iterator to not use shared storage (Closes: #572596):
       Scan once, duplicate the section data, and scan again.
   * apt/package.py:
     - Create a string class BaseDependency.__dstr which makes '>' equal to
       '>>' and '<' equal to '<<' (compatibility).
     - Use the binary package version in Version.fetch_source() if the
       source version is not specified (i.e. in the normal case).
     - Always return unicode strings in Package.get_changelog (Closes: #572998).
   * apt/progress/text.py:
     - Drop InstallProgress, it's useless to keep this alias around.
   * apt/progress/old.py:
     - Let the new method call the old one; e.g. status_update() now calls
       self.statusUpdate(). This improves compatibility for sub classes.
   * Merge with Ubuntu:
     - util/get_ubuntu_mirrors_from_lp.py:
       + rewritten to use +archivemirrors-rss and feedburner
     - pre-build.sh: update ubuntu mirrors on bzr-buildpackage (and also do this
       for Debian mirrors)
     - add break for packagekit-backend-apt (<= 0.4.8-0ubuntu4)
   * tests:
     - test_deps: Add tests for apt_pkg.CheckDep, apt_pkg.check_dep,
       apt_pkg.parse_depends and apt_pkg.parse_src_depends.
   * tests/data/aptsources/sources.list.testDistribution:
     - change one mirror which is not on the mirror list anymore.
   * utils/get_debian_mirrors.py:
     - Parse Mirrors.masterlist instead of the HTML web page.
   * utils/get_ubuntu_mirrors_from_lp.py:
     - Sort the mirror list of each country.
Checksums-Sha1: 
 b3813b135e8379f38bebfaa160cd01f697af0c66 1242 python-apt_0.7.94.dsc
 f1404ed193e906b11d2160dadce1718831cdae7a 274982 python-apt_0.7.94.tar.gz
 3f0a35baae03250a84e6153666b505659ee2bf8f 516100 python-apt_0.7.94_amd64.deb
 7fec20f5f56863df45d02af8a789347765faefd5 193772 python-apt-doc_0.7.94_all.deb
 292ba3678366b8ebd92ba7d2214027babb67d20c 3479326 python-apt-dbg_0.7.94_amd64.deb
 3c8f68e00c598cff939360997a6225546fe2305f 22874 python-apt-dev_0.7.94_all.deb
Checksums-Sha256: 
 650fd4d370ba9be68c5dbe7109126b0342ae7af6cb8e9accb8a1a27afabb7db0 1242 python-apt_0.7.94.dsc
 36205c51d297dc3f6037e00294ffb43983ee7f35e44492571506d08cc0e06a3f 274982 python-apt_0.7.94.tar.gz
 215ede6d3ce8eb7ac115cdbd44af239b21f39f8eb86567ca1214793d6bab51b2 516100 python-apt_0.7.94_amd64.deb
 16b12c0e8aba405f7e01512e396c2e63fcebc68e11feb74bd7db6bbcb57f9cea 193772 python-apt-doc_0.7.94_all.deb
 383f7a2af124c54a0838184f1125e11e51fa190c42358da520c236cbe237142c 3479326 python-apt-dbg_0.7.94_amd64.deb
 645cec4d33881345aa26257f1c9a61a12a14a73a71065f1276e66c2c69b74ec2 22874 python-apt-dev_0.7.94_all.deb
Files: 
 e50fc6f74e1e544167e15188aac9bacb 1242 python optional python-apt_0.7.94.dsc
 1eda09706b1929f7b8cf3f093e46276c 274982 python optional python-apt_0.7.94.tar.gz
 6205b4fa2cfec7ce352976e221118745 516100 python optional python-apt_0.7.94_amd64.deb
 28720f138a2336485e72b1fddccc3432 193772 doc optional python-apt-doc_0.7.94_all.deb
 4459b9daaddac0178722a1406f3cdcfb 3479326 debug extra python-apt-dbg_0.7.94_amd64.deb
 1d8e49719285b0c73de54e1d6b1050cd 22874 python optional python-apt-dev_0.7.94_all.deb

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

iEYEAREDAAYFAkuXuokACgkQrCpf/gCCPsJC3ACfQC/zLauIATIhCKKi1SqqU8tI
BLQAoKFAe1gUw+W6kSq9abJpPBJLi5iw
=Nitc
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: