Bug#734785: dh-golang: Allow comments in debian/control

Alessandro Ghedini ghedo at debian.org
Mon Jul 28 15:50:06 UTC 2014


Control: reassign -1 dh-golang
Control: tags -1 patch

On dom, gen 12, 2014 at 10:56:13 +0100, Michael Stapelberg wrote:
> control: reassign -1 libparse-debcontrol-perl
> 
> Hi Sergio,
> 
> Sergio Schvezov <sergiusens at gmail.com> writes:
> > Dear Maintainer,
> > Adding comments to debian/control break dh_golang
> >
> >    dh_golang -O--buildsystem=golang -O--fail-missing
> >    Parse error: invalid key/value stansa at line 13 of data ("# This
> >    is a comment").
> >    make: *** [binary] Error 255
> >
> > From
> > http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-controlsyntax
> >
> > "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."
> This seems to be a deficiency in the Parse::DebControl Perl package.

This is not true. Parse::DebControl supports stripping comments just fine, but
it doesn't do it by default. From the documentation:

> stripComments - Remove all commented lines in standard #comment format.
>         Literal #'s are represented by ##. For instance
>  
>         Hello there #this is a comment
>         Hello there, I like ##CCCCCC as a grey.
>  
>         The first is a comment, the second is a literal "#".

I attached a patch that makes dh_golang enable this option. I'm also reassigning
this bug back to dh-golang.

> I have a note in the dh-golang source stating that we might want to switch
> to Dpkg::Control::Info

I think this would be an even better solution, since Parse::DebControl appears
to be abandoned upstream and that Dpkg::Control comes directly from the dpkg
developers.

Cheers

P.S. I'm planning to do an NMU fixing both this bug and #721496, but the patch
for the latter makes me a bit uncomfortable considering that it adds a new
user-facing option, so I'd prefer if you commented on it first (or, if you want
to do the upload yourself that would be even better).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Enable-debian-control-comment-stripping.patch
Type: text/x-diff
Size: 857 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20140728/72ba3eb7/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20140728/72ba3eb7/attachment.sig>


More information about the pkg-perl-maintainers mailing list