Package: debian-policy Severity: normal Control: tags -1 patch The specification of Debian control files in Policy §5.1 says: Lines starting with # without any preceding whitespace are comments lines that are only permitted in source package control files (debian/control). These comment lines are ignored, even between two continuation lines. They do not end logical lines. What is the rationale for explicitly disallowing line-end comments in any but that one file? The ‘debian/copyright’ file is an example of a file of the described syntax, that benefits from line-end comments (e.g. for editor hints, or for temporarily disabling some lines, or for explaining an unusual value for a field). There are likely other Debian packaging files of the same syntax where line-end comments are useful. If there is no good rationale to categorically deny all line end comments in other files with that syntax, I suggest the attached patches. -- \ “What is it that makes a complete stranger dive into an icy | `\ river to save a solid gold baby? Maybe we'll never know.” —Jack | _o__) Handey | Ben Finney <ben@benfinney.id.au>
From 04bffa59187df69969d9736dc865514fcd30b840 Mon Sep 17 00:00:00 2001 From: Ben Finney <ben@benfinney.id.au> Date: Mon, 18 Apr 2016 13:31:14 +1000 Subject: [PATCH 1/2] Clarify which characters constitute syntax of control files. --- policy.sgml | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/policy.sgml b/policy.sgml index 404dc737..236bf743 100644 --- a/policy.sgml +++ b/policy.sgml @@ -2541,13 +2541,16 @@ endif </p> <p> - Each paragraph consists of a series of data fields. 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 US-ASCII characters excluding control characters, - space, and colon (i.e., characters in the ranges 33-57 and - 59-126, inclusive). Field names must not begin with the comment - character, <tt>#</tt>, nor with the hyphen character, <tt>-</tt>. + Each paragraph consists of a series of data fields. 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 US-ASCII characters excluding control + characters, space, and colon (i.e., characters in the ranges + U+0021 “<tt>!</tt>” through U+0039 “<tt>9</tt>”, and U+003B + “<tt>;</tt>” through U+007E “<tt>~</tt>”, inclusive). Field + names must not begin with the comment character (U+0023 + “<tt>#</tt>”), nor with the hyphen character (U+002D + “<tt>-</tt>”). </p> <p> @@ -2624,17 +2627,20 @@ Package: libc6 </p> <p> - 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. + Paragraph separators (empty lines), and lines consisting + only of U+0020 SPACE and U+0009 TAB, are not allowed within + field values or between fields. Empty lines in field values + are usually escaped by representing them by a U+0020 SPACE + followed by a U+002E “<tt>.</tt>”. </p> <p> - Lines starting with # without any preceding whitespace are comments - lines that are only permitted in source package control files - (<file>debian/control</file>). These comment lines are ignored, even - between two continuation lines. They do not end logical lines. + Lines starting with U+0023 “<tt>#</tt>”, without any + preceding whitespace, are comment lines that are only + permitted in source package control files + (<file>debian/control</file>). These comment lines are + ignored, even between two continuation lines. They do not + end logical lines. </p> <p> -- 2.8.0.rc3
From 3a00ca0e08f19926a6e64e0e47a8d823eda9846f Mon Sep 17 00:00:00 2001 From: Ben Finney <ben@benfinney.id.au> Date: Mon, 18 Apr 2016 13:46:44 +1000 Subject: [PATCH 2/2] Remove restriction of which control files may contain comments. --- policy.sgml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/policy.sgml b/policy.sgml index 236bf743..9aca360c 100644 --- a/policy.sgml +++ b/policy.sgml @@ -2636,9 +2636,7 @@ Package: libc6 <p> Lines starting with U+0023 “<tt>#</tt>”, without any - preceding whitespace, are comment lines that are only - permitted in source package control files - (<file>debian/control</file>). These comment lines are + preceding whitespace, are comment lines. These comment lines are ignored, even between two continuation lines. They do not end logical lines. </p> -- 2.8.0.rc3
Attachment:
signature.asc
Description: PGP signature