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

January 20th, 2012 - 11:50 am ET by Niels Thykier | Report spam
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



To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 2 repliesReplies Make a reply

Similar topics

Replies

#1 Guillem Jover
January 20th, 2012 - 12:50 pm ET | Report spam
Hi!

On Fri, 2012-01-20 at 17:45:32 +0100, Niels Thykier wrote:
Package: debian-policy
Severity: minor

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 #.
"""



dpkg accepts spacess only after the actual field name and before the
colon, but not in the actual field name itself. They are trimmed for
all practical purposes:

<http://anonscm.debian.org/gitweb/?p...D#l403>

In addition dpkg is quite more lenient on the range of accepted
characters, something I might consider changing (but only slightly).

thanks,
guillem



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#2 Charles Plessy
January 20th, 2012 - 08:00 pm ET | Report spam
forcemerge 647645 656637

Le Fri, Jan 20, 2012 at 05:45:32PM +0100, Niels Thykier a écrit :

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).



Thanks Niels for the report. I am merging it with #647645,
where the same question is already discussed. Can you coment
on the (heavier) wording that I proposed, taking into acount
Justin's suggestions ?

Have a nice week-end,

Charles Plessy
Tsurumi, Kanagawa, Japan



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
email Follow the discussion Replies Reply to this message
Help Create a new topicReplies Make a reply
Search Make your own search