Bug#535958: libparse-debcontrol-perl: fails to parse control files with comments

Russ Allbery rra at debian.org
Tue Jul 7 02:07:32 UTC 2009


Jonathan Yu <jonathan.i.yu at gmail.com> writes:
> On Mon, Jul 6, 2009 at 9:57 PM, Russ Allbery<rra at debian.org> wrote:

>> Policy 5.2.  They're permitted only in debian/control, not in other
>> control files.

> Is there a particular reason why comments can't be used in other
> control files?

Other control parsers don't allow them and will throw error messages and
fail to parse the file.  Only dpkg-gencontrol understands comments.

> My software (libdebctrl) currently just scans any RFC822-alike file
> and considers them the same, which means if I add functionality to
> handle comments, it will apply to any debian control files, not just
> debian/control.
>
> There is no easy way for me to issue a warning if comments are used in
> files other than debian/control, because the Parser part is a "dumb"
> parser that just extracts the structure from files with the RFC822
> structure.

This is something that you'll have to worry about in other contexts as
well.  The syntax isn't the same for all of the control files.  For
example, wrapping of normally single-line fields is permitted only in
debian/control, not in other control files.

It's much easier to add features to debian/control than to the other
control files, since there are far fewer programs that parse it.

-- 
Russ Allbery (rra at debian.org)               <http://www.eyrie.org/~eagle/>





More information about the pkg-perl-maintainers mailing list