[libconfig-model-dpkg-perl] 08/13: Dependency: preserve perl versioned dep if no versioned dep is provided with alternate lib

dod at debian.org dod at debian.org
Wed May 20 16:58:50 UTC 2015


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

dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.

commit 9f7be59fca0af1e973070b4a2e0ba814dd386c34
Author: Dominique Dumont <dod at debian.org>
Date:   Wed May 20 14:21:04 2015 +0200

    Dependency: preserve perl versioned dep if no versioned dep is provided with alternate lib
---
 lib/Config/Model/Dpkg/Dependency.pm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/Config/Model/Dpkg/Dependency.pm b/lib/Config/Model/Dpkg/Dependency.pm
index a7682d7..24a4944 100644
--- a/lib/Config/Model/Dpkg/Dependency.pm
+++ b/lib/Config/Model/Dpkg/Dependency.pm
@@ -528,11 +528,13 @@ sub check_perl_lib_dep {
 	$v_normal =~ s/^v//;    # loose the v prefix
 	if ( $logger->is_debug ) {
 		my $dep_str = $dep_name . ( defined $check_v ? ' ' . $check_v : '' );
-		$logger->debug("dual life $dep_str found in Perl core $v_normal");
+		$logger->debug("dual life $dep_str found in Perl core $v_normal (req perl is $old_perl_versioned_dep)");
 	}
 
-    if ($old_perl_versioned_dep and $vs->compare($old_perl_versioned_dep, $v_normal) < 0) {
-        # if the old version of Perl was enough, there's no need to restrict more the Perl version
+    if ( not defined $dep_v and $old_perl_versioned_dep ) {
+        # when alternate lib version is not defined (because the requirement is satisfied by all
+        # available versions of the lib), the actual requirement is held by the versioned dep of perl
+        # hence, it must be preserved
 		$logger->debug("preserving old perl versioned dep $old_perl_versioned_dep instead of $v_normal"
                        ." for $dep_name");
         $v_normal = $old_perl_versioned_dep;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git



More information about the Pkg-perl-cvs-commits mailing list