Bug#538376: python-debian: debian_bundle parses some multilines fields inconsistantly

sean finney seanius at debian.org
Sat Jul 25 10:34:43 UTC 2009


Package: python-debian
Version: 0.1.14
Severity: important

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi!

i discovered this one when trying to run the patch-tracker.debian.net code
on an updated sid system.

if a record in a Sources file has only a single checksum entry, it's returned
as a single dict object.  if it has multiple entries, they are returned as
a list of dicts.  for example, with an abbriviated Sources file like this:

cat << EOF > sourcesfile
Package: debian-archive-keyring
Files:
 2675031b2286ca8dfc085e2a9c9d38ed 838 debian-archive-keyring_2009.01.31.dsc
 5365c07ddcf639544933552e31a571ee 13627 debian-archive-keyring_2009.01.31.tar.gz
Checksums-Sha1:
 dd987a5ee85d8c4fc3e115f60a6a021e78c626dd 13627 debian-archive-keyring_2009.01.31.tar.gz

Package: povray
Files:
 8ba29fc593db0da2f69b24cb732a787a 1404 povray_3.7.0~beta29-1.dsc
 5f18fcdf332164151fc8f8e200f9bffe 6761402 povray_3.7.0~beta29.orig.tar.gz
 0b7ea3d5724f5f7a50c0277a194fea3f 24696 povray_3.7.0~beta29-1.diff.gz
Checksums-Sha1:
 c2b88b819f5b8fe731990bec2e02654d67c5df34 6761402 povray_3.7.0~beta29.orig.tar.gz
 bf7ed630c44fa37b0eb24b666a5a16c2701ec202 24696 povray_3.7.0~beta29-1.diff.gz
EOF

and the following code:

slist = deb822.Sources.iter_paragraphs(file('sourcesfile'))
for ent in slist:
  print ent['Checksums-Sha1']

you get:

{'sha1': 'dd987a5ee85d8c4fc3e115f60a6a021e78c626dd', 'size': '13627', 'name': 'debian-archive-keyring_2009.01.31.tar.gz'}
[{'sha1': 'c2b88b819f5b8fe731990bec2e02654d67c5df34', 'size': '6761402', 'name': 'povray_3.7.0~beta29.orig.tar.gz'}, {'sha1': 'bf7ed630c44fa37b0eb24b666a5a16c2701ec202', 'size': '24696', 'name': 'povray_3.7.0~beta29-1.diff.gz'}

and i would argue you should get:

[{'sha1': 'dd987a5ee85d8c4fc3e115f60a6a021e78c626dd', 'size': '13627', 'name': 'debian-archive-keyring_2009.01.31.tar.gz'}]
[{'sha1': 'c2b88b819f5b8fe731990bec2e02654d67c5df34', 'size': '6761402', 'name': 'povray_3.7.0~beta29.orig.tar.gz'}, {'sha1': 'bf7ed630c44fa37b0eb24b666a5a16c2701ec202', 'size': '24696', 'name': 'povray_3.7.0~beta29-1.diff.gz'}

which i believe was the previous behavior.

i should be able to code around this problem but it does seem to be
a regression.

	sean

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

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-debian depends on:
ii  python                        2.5.4-2    An interactive high-level object-o
ii  python-support                1.0.3      automated rebuilding support for P

Versions of packages python-debian recommends:
ii  python-apt                    0.7.11.0   Python interface to libapt-pkg

Versions of packages python-debian suggests:
ii  gpgv                          1.4.9-4    GNU privacy guard - signature veri

- -- no debconf information

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

iD8DBQFKat+/ynjLPm522B0RAorKAJkBUww/FFblYe89Jnd0TVm4Z51k2ACfRC0k
m7hToedec/16kKqNgpu6kd0=
=Jx2c
-----END PGP SIGNATURE-----





More information about the pkg-python-debian-maint mailing list