[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#627490: debian-policy: Description field specification is ambiguous



On Sat, 2011-05-21 at 16:10:59 +0900, Charles Plessy wrote:
> Le Sat, May 21, 2011 at 08:47:22AM +0200, Guillem Jover a écrit :
> > 
> > The current specification for the Description field in §5.6.13 seems
> > to be ambiguous regarding what can or cannot follow the initial
> > characters.
> > 
> > It specifies that a line can start with either “a single space” or
> > “two or more spaces”, or contain either “a single space followed by
> > full stop” or “a single space followed by full stop and some more
> > characters”.
> > 
> > What does not seem to be clear is if the two first types can
> > optionally have characters following the initial spaces, or if by
> > “starting” it's implied they require them to be “continued”.

> §5.1 (Syntax of control files) sepcifies that
> 
>   The paragraphs are separated by empty lines. Parsers may accept lines
>   consisting solely of spaces and tabs as paragraph separators, but control files
>   should use empty lines.
> 
> and
> 
>   Paragraph separators (empty lines) and lines consisting only of spaces and tabs
>   are not allowed within field values or between fields. Empty lines in field
>   values are usually escaped by representing them by a space followed by a dot. 

Ah! I was actually surprised of not seeing this explicitly in §5.6.13,
given the detail it goes into when describing the line contents, and
assumed that given the current dpkg behaviour that should have been
underspecified, should have checked the rest of the policy though. :/

In any case I still think it might be a good idea to mention that the
two first line types must contain at least one non space character.
Compare it with the Changes, Files or Checksum field sections, where
that's explicitly mentioned.

> The control file described in #308082 and other control files where empty
> lines in field values are not escaped with a space are definitely not
> valid.  If necessary, a note could be added in §5.6.13 to remind §5.1.

dpkg errors out on empty lines inside a field value, but not blank
lines (those consisting only of spaces/tabs).

Anyway, I've fixed now the parser to refuse such bogus lines, will
push it whenever alioth is back.

thanks,
guillem



Reply to: