[dh-make-perl] 02/02: Fix parsing of sources.list entry with options in brackets

Axel Beckert abe at deuxchevaux.org
Wed Apr 22 23:51:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository dh-make-perl.

commit 99fe5fdb25e9ac6f85ee46d094c76210a6e11e45
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Thu Apr 23 01:49:57 2015 +0200

    Fix parsing of sources.list entry with options in brackets
    
    Closes: #783110
    
    Thanks Lucas Nussbaum for the bug report!
---
 debian/changelog          | 2 ++
 lib/Debian/AptContents.pm | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 98b145f..aaf34c3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ dh-make-perl (0.84-3) UNRELEASED; urgency=medium
   [ Axel Beckert ]
   * Improve misleading error message if apt-file installed but no contents
     files could be found.
+  * Fix parsing of sources.list entry with options in brackets. (Closes:
+    #783110; Thanks Lucas Nussbaum for the bug report.)
 
  -- Axel Beckert <abe at debian.org>  Wed, 22 Apr 2015 20:30:03 +0200
 
diff --git a/lib/Debian/AptContents.pm b/lib/Debian/AptContents.pm
index e47af51..1267487 100644
--- a/lib/Debian/AptContents.pm
+++ b/lib/Debian/AptContents.pm
@@ -163,6 +163,9 @@ F<sources.list>), converts it to the corresponding F<Contents> file names.
 sub repo_source_to_contents_paths {
     my ( $self, $source ) = @_;
 
+    # Weed out options in brackets first
+    $source =~ s/\[[^][]+\]//;
+
     my ( $schema, $uri, $dist, @components ) = split /\s+/, $source;
     my ( $proto, $host, $port, $dir ) = $uri =~ m{
 	^

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/dh-make-perl.git



More information about the Pkg-perl-cvs-commits mailing list