Package: dh-make-perl
Version: 0.91
Severity: normal
Tags: patch

Dear maintainers,

Debian::Control will fail to read source package control files if they
contain comments.  This patch passes the stripComments option to
Parse::DebControl which deals with the problem.

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: i386 (i686)

Kernel: Linux 4.5.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dh-make-perl depends on:
ii  debhelper                              9.20160403
ii  dpkg-dev                               1.18.4
ii  fakeroot                               1.20.2-1
ii  libapt-pkg-perl                        0.1.29+b5
ii  libarray-unique-perl                   0.08-2
ii  libclass-accessor-perl                 0.34-1
ii  libconfig-ini-perl                     1:0.025-1
ii  libdpkg-perl                           1.18.4
ii  libemail-address-perl                  1.908-1
ii  libemail-date-format-perl              1.005-1
ii  libfile-which-perl                     1.19-1
ii  liblist-moreutils-perl                 0.413-1+b1
ii  libmodule-depends-perl                 0.16-2
ii  libparse-debcontrol-perl               2.005-4
ii  libparse-debianchangelog-perl          1.2.0-8
ii  libsoftware-license-perl               0.103011-3
ii  libtie-ixhash-perl                     1.23-2
ii  libwww-mechanize-perl                  1.75-1
ii  libyaml-libyaml-perl                   0.41-6+b1
ii  libyaml-perl                           1.15-1
ii  make                                   4.1-9
ii  perl                                   5.22.1-10
ii  perl-modules-5.22 [libcpan-meta-perl]  5.22.1-10

Versions of packages dh-make-perl recommends:
ii  apt                   1.2.11
ii  apt-file              3.0
ii  git                   1:2.8.1-1
ii  libdpkg-parse-perl    0.03-1
ii  libmodule-build-perl  0.421600-1
ii  pristine-tar          1.33

dh-make-perl suggests no packages.

-- no debconf information

-- 
Sean Whitton
From: Sean Whitton <spwhit...@spwhitton.name>
Date: Sat, 7 May 2016 15:24:06 -0700
Subject: [PATCH] strip comments when reading debian/control

Avoids a parse failure if a control file contains comments.
---
 debian/changelog      | 5 +++++
 lib/Debian/Control.pm | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 8914cbb..af3370b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 dh-make-perl (0.91) UNRELEASED; urgency=medium
 
+  [ gregor herrmann ]
   * debian/source/format: switch to '3.0 (native)'.
     Cf. the thread at https://lists.debian.org/debian-perl/2016/03/msg00038.html
     for the history and pros/cons of having a non-native vs. a native package.
@@ -20,6 +21,10 @@ dh-make-perl (0.91) UNRELEASED; urgency=medium
     local::lib environment temporarily.
     Thanks to Jacob L Anawalt for the bug report. (Closes: #820395)
 
+  [ Sean Whitton ]
+  * Strip comments when reading control files.  (Closes: #XXXXXX)
+    Otherwise, control files containing comments cause a parse failure.
+
  -- gregor herrmann <gre...@debian.org>  Wed, 06 Apr 2016 17:35:59 +0200
 
 dh-make-perl (0.90-1) unstable; urgency=medium
diff --git a/lib/Debian/Control.pm b/lib/Debian/Control.pm
index c9e1eb8..4244766 100644
--- a/lib/Debian/Control.pm
+++ b/lib/Debian/Control.pm
@@ -115,7 +115,7 @@ sub read {
     }
 
     my $stanzas = $self->_parser->$parser_method( $file,
-        { useTieIxHash => 1, verbMultiLine => 1 } );
+        { useTieIxHash => 1, verbMultiLine => 1, stripComments => 1 } );
 
     for (@$stanzas) {
         if ( $_->{Source} ) {
-- 
2.8.1

Attachment: signature.asc
Description: PGP signature

Reply via email to