Bug#501927: debian_bundle fails with empty lines containing a space
Stefano Zacchiroli
zack at debian.org
Sat Oct 11 17:05:31 UTC 2008
tags 501927 + patch
clone 501927 -1
retitle -1 please be more clear about stanza separators for debian/control
reassign -1 debian-policy
thanks
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 last paragraph of yours is actually the patch ]
Interestingly enough, the Debian policy is ambiguous about what are
the paragraph separators in debian/control. Section 5.1 first states
that blank lines are separators (which is usually interpreted as "\n"
alone):
A control file consists of one or more paragraphs of fields[1].
The paragraphs are separated by blank lines.
Then, later on, it seems to allow for other blank characters,
mentioning spaces and tabs:
Blank lines, or lines consisting only of spaces and tabs, are not
allowed within field values or between fields - that would mean a
new paragraph.
If generic blanks (space, tabs, ...) are the intended separators I've
no objection in fixing the bug as you propose. Cloning/reassigning
this bug to policy, as it needs to be discussed there as well.
Thanks for your bugreport!
Cheers.
--
Stefano Zacchiroli -*- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
I'm still an SGML person,this newfangled /\ All one has to do is hit the
XML stuff is so ... simplistic -- Manoj \/ right keys at the right time
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-python-debian-maint/attachments/20081011/381648c7/attachment.pgp
More information about the pkg-python-debian-maint
mailing list