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

Bug#656637: debian-policy: §5.1 is slightly ambiguous on space



Package: debian-policy
Severity: minor


Hi,

I would like to request a clarification on whether spaces are allowed
in fields.  My first thought was that it is not allowed.  However
units-filter/3.5-2 has a a space in the fields of its d/control file,
so presumably dpkg accepts it (at least to some extend).


Looking at the Policy §5.1, I found:

"""
[...] each field consists of the field name, followed by a colon
and then the data/value associated with that field. The field name is
composed of printable ASCII characters (i.e., characters that have
values between 33 and 126, inclusive) except colon and must not with a
begin with #.
"""

Here is usage of "printable ASCII characters" seems to imply
isprint(3), which considers space a printable.  However the range
(33-126) does not include space (32).  This leaves me two possible
interpretations:

 1. Typo in the range 33-126 (and 32-126 was intended).
    - In this case, it is missing that fields must not start with
      space (as in that case the space is a continuation character).
    - Considering that the "comment" character and other symbols
      (!$@&"` etc.) is allowed in a field, a space is not unthinkable.
    - The results of googling "printable ASCII" seems to support this
      interpretation.
 2. "printable" is not defined by isprint(3) and the range is correct.
    - In this case, the use of "printable ASCII" without an explicit
      exception for space character might be slightly confusing.

If space is allowed, I would suggest somthing like:

"""
The field name is composed of printable ASCII characters (i.e.,
characters that have values between 32 and 126, inclusive) except
colon.  The field name must not with a begin with # or a space
character.
"""


Otherwise, I would suggest:

"""
The field name is composed of printable ASCII characters (i.e.,
characters that have values between 32 and 126, inclusive) except
colon and space.  The field name must not with a begin with #.
"""


Thanks in advance for the clarification,
~Niels



Reply to: