Bug#604093: Bug #604093: python-debian: iter_paragraphs: be more robust against RFC822 comments in unicoded files -- swallows the trailer
Stuart Prescott
stuart at debian.org
Tue Jul 29 13:31:31 UTC 2014
Hi Yaroslav,
> > The only place where comments are defined in deb822 files that I can find
> > is in policy §5.1 and they are only defined for debian/control files and
> > comments are started by a # at the start of the line.
>
> if I get it right, I either saw (or found somewhere) a confirmation that
> deb822 is based on (not just inspired by) rfc822, and that is why I was
> expecting comments as defined in rfc822 be respected:
>
> https://www.ietf.org/rfc/rfc0822.txt
> 2.8. ; COMMENTS
>
> A semi-colon, set off some distance to the right of rule
> text, starts a comment that continues to the end of line. This
> is a simple way of including useful notes in parallel with the
> specifications.
>
>
> but if deb822 is not derived from rfc822, I guess my report was a moot ;)
I can see where you're coming from here. Our definition of the format is Policy
§5.1, which doesn't actually mention RFC822, defines some things that are not
in that RFC and doesn't include other things that are. I suspect that our
common description of this format as being "pseudo-rfc822" is a (clumsy)
shorthand that at times leads us astray.
So, I think your bug report exposed some useful inconsistencies in deb822's
handling of filehandles vs other generators and I think we're getting close to
solving them. Adding handling to the parser for ";"-comments, however, I think
we should skip.
cheers
Stuart
(thanks to juliank and others in #d-devel for confirming my suspicions)
--
Stuart Prescott http://www.nanonanonano.net/ stuart at nanonanonano.net
Debian Developer http://www.debian.org/ stuart at debian.org
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
More information about the pkg-python-debian-maint
mailing list