Bug#743174: paragraph parsing truncates on comments

Martin Pitt mpitt at debian.org
Mon Mar 31 08:16:51 UTC 2014


Package: python-debian
Version: 0.1.21+nmu2

Hello,

while debugging an autopkgtest bug[1] I noticed that python-debian's
parsing of paragraphs ignores everything after a line comment. Simple
reproducer:

$ echo -e 'Build-Depends: foo,\n#comment\n bar' | python -c 'import sys, debian.deb822; l = [p for p in debian.deb822.Deb822.iter_paragraphs(sys.stdin)]; print(l)'
[{'Build-Depends': u'foo,'}]

This parses

---------
Build-Depends: foo,
#comment
 bar
---------

but "bar" doesn't appear in the result. E. g. lintian has that in its
debian/control file.

Thanks for considering,

Martin

[1] https://launchpad.net/bugs/1300031
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-python-debian-maint/attachments/20140331/ee9b1328/attachment.sig>


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