Bug#604093: Bug #604093: python-debian: iter_paragraphs: be more robust against RFC822 comments in unicoded files -- swallows the trailer

Yaroslav Halchenko yoh at debian.org
Tue Aug 26 03:11:00 UTC 2014


On Mon, 25 Aug 2014, John Wright wrote:

> Hi Stuart (and pkg-python-debian-maint):

> On Tue, Jul 29, 2014 at 11:31:31PM +1000, Stuart Prescott wrote:
> > > > 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.

> Shall we then tag this bug "wontfix", or close it?  I think the main
> inconsistency point is solved by a recent patch set by Stuart that
> prefers the native parser unless the Sources or Packages class is
> explicitly used, and I agree that we should not attempt to implement
> comment parsing that, while correct RFC822, is not specified in the
> control format policy.

FWIW -- do not wait on my 1c -- I trust you guys in your decision ;-)
-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist,            Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        



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