r56170 - in /trunk/dh-make-perl: debian/changelog lib/Debian/AptContents.pm t/AptContents.t
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Fri Apr 16 09:42:44 UTC 2010
Author: dmn
Date: Fri Apr 16 09:42:35 2010
New Revision: 56170
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=56170
Log:
find_perl_module_package: return alternative dependencies if several packages contain the given module
Closes: #548367 -- detect alternative dependencies; Thanks to Slaven Rezic
Modified:
trunk/dh-make-perl/debian/changelog
trunk/dh-make-perl/lib/Debian/AptContents.pm
trunk/dh-make-perl/t/AptContents.t
Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=56170&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Fri Apr 16 09:42:35 2010
@@ -20,6 +20,9 @@
is_core_module(); Thanks to Josef Kutej
Also Closes: #571642 -- nice_perl_ver() should be also used for
is_core_module() dependencies; Thanks to Josef Kutej
+ * when more than one package contain a given depended-on module, create
+ alternative dependencies.
+ Closes: #548367 -- detect alternative dependencies; Thanks to Slaven Rezic
-- Damyan Ivanov <dmn at debian.org> Tue, 09 Mar 2010 08:46:09 +0200
Modified: trunk/dh-make-perl/lib/Debian/AptContents.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/Debian/AptContents.pm?rev=56170&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/Debian/AptContents.pm (original)
+++ trunk/dh-make-perl/lib/Debian/AptContents.pm Fri Apr 16 09:42:35 2010
@@ -429,7 +429,9 @@
} @matches;
my $direct_dep;
- $direct_dep = Debian::Dependency->new( $matches[0], $version )
+ $direct_dep
+ = Debian::Dependency->new(
+ [ map ( { pkg => $_, ver => $version }, @matches ) ] )
if @matches;
my $running_perl = $Config::Config{version};
Modified: trunk/dh-make-perl/t/AptContents.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/AptContents.t?rev=56170&op=diff
==============================================================================
--- trunk/dh-make-perl/t/AptContents.t (original)
+++ trunk/dh-make-perl/t/AptContents.t Fri Apr 16 09:42:35 2010
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 22;
+use Test::More tests => 23;
BEGIN {
use_ok 'Debian::AptContents';
@@ -122,4 +122,9 @@
"GD.pm is in libdg-gd2[-noxpm]-perl"
);
+is( $apt_contents->find_perl_module_package('GD'),
+ 'libgd-gd2-noxpm-perl | libgd-gd2-perl',
+ 'Alternative dependency for module found in multiple packages'
+);
+
ok( unlink "$Bin/Contents.cache", 'Contents.cache unlnked' );
More information about the Pkg-perl-cvs-commits
mailing list