r53045 - in /trunk/dh-make-perl: lib/Debian/Control/FromCPAN.pm t/Control.t
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Thu Feb 18 22:53:07 UTC 2010
Author: dmn
Date: Thu Feb 18 22:53:01 2010
New Revision: 53045
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53045
Log:
fix the oldstable perl version check for B-D
the problem was that "considered unversioned" perl B-D was returned intact,
leaving the version. now the version is wiped out if it is too old
Modified:
trunk/dh-make-perl/lib/Debian/Control/FromCPAN.pm
trunk/dh-make-perl/t/Control.t
Modified: trunk/dh-make-perl/lib/Debian/Control/FromCPAN.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/Debian/Control/FromCPAN.pm?rev=53045&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/Debian/Control/FromCPAN.pm (original)
+++ trunk/dh-make-perl/lib/Debian/Control/FromCPAN.pm Thu Feb 18 22:53:01 2010
@@ -260,6 +260,13 @@
and deb_ver_cmp( $dep->ver, $self->oldstable_perl_version ) <= 0
);
+ # if the dependency is considered unversioned, make sure there is no
+ # version
+ if ($unversioned) {
+ $dep->ver(undef);
+ $dep->rel(undef);
+ }
+
# perl-base is (build-)essential
return undef
if $dep->pkg eq 'perl-base' and $unversioned;
Modified: trunk/dh-make-perl/t/Control.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/Control.t?rev=53045&op=diff
==============================================================================
--- trunk/dh-make-perl/t/Control.t (original)
+++ trunk/dh-make-perl/t/Control.t Thu Feb 18 22:53:01 2010
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 20;
+use Test::More tests => 21;
use Test::Exception;
use Test::Differences;
@@ -82,3 +82,10 @@
is( $c->binary->FETCH('libtest-compile-perl')->Depends . '',
'${misc:Depends}, ${perl:Depends}, libuniversal-require-perl'
);
+
+# same thing, with B-D
+$c->source->Build_Depends_Indep->add('perl (>= 5.8.8)');
+$c->prune_perl_deps;
+is( $c->source->Build_Depends_Indep . '',
+ 'libtest-pod-coverage-perl, libtest-pod-perl, libuniversal-require-perl, perl'
+);
More information about the Pkg-perl-cvs-commits
mailing list