[dh-make-perl] 02/03: FromCPAN/find_debs_for_modules: remove core packages from the result of DpkgLists->scan_perl_mod

Damyan Ivanov dmn at moszumanska.debian.org
Tue Mar 21 21:18:08 UTC 2017


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

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

commit fa98e7c893928295e97b3223eac82612ae764788
Author: Damyan Ivanov <dmn at debian.org>
Date:   Tue Mar 21 21:16:38 2017 +0000

    FromCPAN/find_debs_for_modules: remove core packages from the result of DpkgLists->scan_perl_mod
    
    this code path is entered when the wanted module is not found in the
    current core. If the reason for that is that core has a lower version,
    the result from scan_perl_mod will include core packages
    
    Closes: #854046
---
 lib/Debian/Control/FromCPAN.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/Debian/Control/FromCPAN.pm b/lib/Debian/Control/FromCPAN.pm
index 2cd9681..8c8dfad 100644
--- a/lib/Debian/Control/FromCPAN.pm
+++ b/lib/Debian/Control/FromCPAN.pm
@@ -322,6 +322,11 @@ sub find_debs_for_modules {
             $dep = Debian::Dependency->new( 'perl', $ver );
         }
         elsif ( my @pkgs = Debian::DpkgLists->scan_perl_mod($module) ) {
+            # core packages should be included above
+            # it is normal to have them here, in case the version
+            # requirement can't be satisfied by the current perl
+            @pkgs = grep { !is_core_perl_package($_) } @pkgs;
+
             $dep = Debian::Dependency->new(
                   ( @pkgs > 1 )
                 ? [ map { { pkg => $_, ver => $version } } @pkgs ]

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