r76963 - in /trunk/dh-make-perl: debian/changelog lib/Debian/AptContents.pm t/AptContents.t t/contents/test_debian_dists_testing_Contents
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Sat Jul 2 13:37:21 UTC 2011
Author: dmn
Date: Sat Jul 2 13:37:19 2011
New Revision: 76963
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=76963
Log:
Prevent missed alternative dependencies from contents
apply a patch from Manfred Stock fixing AptContents not to miss alternative
dependencies when a given module is found in more than one package.
Closes: #622852
Modified:
trunk/dh-make-perl/debian/changelog
trunk/dh-make-perl/lib/Debian/AptContents.pm
trunk/dh-make-perl/t/AptContents.t
trunk/dh-make-perl/t/contents/test_debian_dists_testing_Contents
Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=76963&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Sat Jul 2 13:37:19 2011
@@ -26,6 +26,9 @@
invalidate cache or use platform-netural Storable format
* bump default debhelper compatibility level to 8
* note oldstable has perl 5.10.0, not 5.8.8
+ * apply a patch from Manfred Stock fixing AptContents not to miss
+ alternative dependencies when a given module is found in more than one
+ package. Closes: #622852
-- Salvatore Bonaccorso <carnil at debian.org> Wed, 25 May 2011 16:04:40 +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=76963&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/Debian/AptContents.pm (original)
+++ trunk/dh-make-perl/lib/Debian/AptContents.pm Sat Jul 2 13:37:19 2011
@@ -319,7 +319,9 @@
| perl/(?:\d[\d.]+)/ # or perl/5.10/
)
}{}x;
- $cache->{apt_contents}{$file} = $packages;
+ $cache->{apt_contents}{$file} = exists $cache->{apt_contents}{$file}
+ ? $cache->{apt_contents}{$file}.','.$packages
+ : $packages;
# $packages is a comma-separated list of
# section/package items. We'll parse it when a file
@@ -396,7 +398,7 @@
# otherwise it won't strip enough off Ubuntu's
# usr/share/perl5/Config/Any.pm universe/perl/libconfig-any-perl
- return @packages;
+ return uniq @packages;
}
=item find_perl_module_package( $module, $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=76963&op=diff
==============================================================================
--- trunk/dh-make-perl/t/AptContents.t (original)
+++ trunk/dh-make-perl/t/AptContents.t Sat Jul 2 13:37:19 2011
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 23;
+use Test::More tests => 25;
BEGIN {
use_ok 'Debian::AptContents';
@@ -128,4 +128,15 @@
'Alternative dependency for module found in multiple packages'
);
+is_deeply(
+ [ $apt_contents->find_file_packages('Image/Magick.pm') ],
+ [ 'perlmagick', 'graphicsmagick-libmagick-dev-compat' ],
+ "Image/Magick.pm in perlmagick and graphicsmagick-libmagick-dev-compat, but different paths"
+);
+
+is( $apt_contents->find_perl_module_package('Image::Magick') . '',
+ 'graphicsmagick-libmagick-dev-compat | perlmagick',
+ 'Alternative dependency for Image::Magick module found in multiple packages'
+);
+
ok( unlink "$Bin/Contents.cache", 'Contents.cache unlnked' );
Modified: trunk/dh-make-perl/t/contents/test_debian_dists_testing_Contents
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/contents/test_debian_dists_testing_Contents?rev=76963&op=diff
==============================================================================
--- trunk/dh-make-perl/t/contents/test_debian_dists_testing_Contents (original)
+++ trunk/dh-make-perl/t/contents/test_debian_dists_testing_Contents Sat Jul 2 13:37:19 2011
@@ -1148,3 +1148,6 @@
usr/share/request-tracker3.6/lib/RT/URI/fsck_com_rt.pm misc/request-tracker3.6
usr/share/request-tracker3.6/lib/RT/URI/fsck_com_rtfm.pm misc/rt3.6-rtfm
usr/share/request-tracker3.6/lib/RT/URI/t.pm misc/request-tracker3.6
+usr/lib/perl5/Image/Magick.pm perl/perlmagick
+usr/share/perl5/GD/SecurityImage/Magick.pm perl/libgd-securityimage-perl
+usr/share/perl5/Image/Magick.pm graphics/graphicsmagick-libmagick-dev-compat
More information about the Pkg-perl-cvs-commits
mailing list