Bug#501927: debian_bundle fails with empty lines containing a space

Stefano Zacchiroli zack at debian.org
Tue Apr 7 08:58:48 UTC 2009


On Sat, Oct 11, 2008 at 06:50:03PM +0200, Siegfried Gevatter (RainCT) wrote:
> Parsing hundreds of debian/control files from REVU (Ubuntu's "New
> Package Review Platform") using debian_support.PackageFile, I've found
> out that it failed with many of them have they had a space between
> different Package stanzas (that is, " \n" instead of just "\n").
> 
> Therefore, line «if line == '\n':» (line 110, function __iter__)
> should be «if line.strip(' ') == '\n':» instead, so that it handles
> that case gracefully.

This is now fixed, and will arrive in the (Debian) archive shortly.

A few notes:

- the policy clarification we discussed is still pending (see #501930)

- the behavior you required is coherent with what debian_bundle.deb822
  does (which is the main reason why I fixed this in spite of the
  pending clarification)

- the "legacy", and more feature-ful/fast anyhow, parser for 822-like
  Debian files is debian_bundle.deb822. Please consider using it in
  the future instead of debian_bundle.debian_support for Packages file
  parsing

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime





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