[dh-make-perl] 01/03: DpkgLists.t: add support for the packaging layout in perl 5.22

Damyan Ivanov dmn at moszumanska.debian.org
Sun Jul 12 20:54:05 UTC 2015


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 b62356acff52aa3d13cb6c52d2500e5e9355579e
Author: Damyan Ivanov <dmn at debian.org>
Date:   Sun Jul 12 07:46:18 2015 +0000

    DpkgLists.t: add support for the packaging layout in perl 5.22
    
    Closes: #789729 -- FTBFS with perl 5.22
---
 t/DpkgLists.t | 35 +++++++++++++++++++++++++++--------
 1 file changed, 27 insertions(+), 8 deletions(-)

diff --git a/t/DpkgLists.t b/t/DpkgLists.t
index 2a393f2..951ad95 100755
--- a/t/DpkgLists.t
+++ b/t/DpkgLists.t
@@ -3,6 +3,7 @@
 use strict;
 use warnings;
 
+use Config;
 use Test::More tests => 7;
 
 BEGIN {
@@ -11,6 +12,15 @@ BEGIN {
 
 my $m = 'Debian::DpkgLists';
 
+my $perl_api = $Config{PERL_API_REVISION}.'.'.$Config{PERL_API_VERSION};
+
+my $arch = `dpkg-architecture -q DEB_HOST_ARCH`;
+
+my $pkg_perl_modules = "perl-modules-$perl_api";
+my $pkg_libperl = "libperl$perl_api:$arch";
+
+my $split_perl_base = ( $perl_api ge '5.22' );
+
 is_deeply( [ $m->scan_full_path('/usr/bin/perl') ],
     ['perl-base'], '/usr/bin/perl is in perl-base' );
 
@@ -20,11 +30,20 @@ ok( grep( 'perl-base', @found ), 'partial /bin/perl is in perl-base' );
 @found = $m->scan_pattern(qr{/bin/perl$});
 ok( grep( 'perl-base', @found ), 'qr{/bin/perl$} is in perl-base' );
 
-is_deeply( [ $m->scan_perl_mod('Errno') ],
-    ['perl-base'], 'Errno is in perl-base' );
-
-is_deeply( [ $m->scan_perl_mod('IO::Socket::UNIX') ],
-    ['perl-base'], 'IO::Socket::UNIX is in perl-base' );
-
-is_deeply( [ $m->scan_perl_mod('utf8') ],
-    ['perl-base'], 'utf8 is in perl-base' );
+is_deeply(
+    [ $m->scan_perl_mod('Errno') ],
+    $split_perl_base ? [$pkg_libperl] : ['perl-base'],
+    'Errno is in perl-base'
+);
+
+is_deeply(
+    [ $m->scan_perl_mod('IO::Socket::UNIX') ],
+    $split_perl_base ? [$pkg_libperl] : ['perl-base'],
+    'IO::Socket::UNIX is in perl-base'
+);
+
+is_deeply(
+    [ $m->scan_perl_mod('utf8') ],
+    [ 'perl-base', $split_perl_base ? $pkg_perl_modules : () ],
+    'utf8 is in perl-base'
+);

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