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

Bug#821363: debian-policy: Allow line-end comments in all Debian packaging control files



Hi!

On Mon, 2016-04-18 at 14:52:22 +1000, Ben Finney wrote:
> 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?

This just predates other files in source packages using deb822 syntax.
The reason is that the control file in a binary package does not
support comments for example. If you want to extend this list, please
make sure each and every file you want to add supports comments by
the major parsers. Remember that policy tends to be descriptive not
prescriptive.

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

The fact that it might benefit from it does not mean that this should
be documented as such w/o getting agreement that this is alright, and
implementing the support in the major parsers. In the case of the
copyright file, the document specifying it does not list # as valid
comment markers.

For example parsing debian/copyright files (or any other file using
deb822-based syntax) via the Dpkg::Control::Hash perl module would
make it accept such comments, but I don't know if other parsers will
accept those too.

> If there is no good rationale to categorically deny all line end
> comments in other files with that syntax, I suggest the attached
> patches.

Yes, they are probably just not supported.

Thanks,
Guillem


Reply to: