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 b1cc409040694b62b2b2118e170af280592e7bbd
Author: Dominique Dumont <d...@debian.org>
Date:   Thu Apr 17 19:30:35 2014 +0200

    removed $on_get_lib_version from check_perl_lib_dep
---
 lib/Config/Model/Dpkg/Dependency.pm | 87 ++++++++++++++++++-------------------
 1 file changed, 43 insertions(+), 44 deletions(-)

diff --git a/lib/Config/Model/Dpkg/Dependency.pm 
b/lib/Config/Model/Dpkg/Dependency.pm
index 8c8e761..af05e4c 100644
--- a/lib/Config/Model/Dpkg/Dependency.pm
+++ b/lib/Config/Model/Dpkg/Dependency.pm
@@ -468,52 +468,10 @@ sub check_perl_lib_dep {
     my @ideal_lib_dep ;
     my @ideal_dep_chain = (\@ideal_perl_dep);
 
-    my ($on_get_lib_version, $on_perl_check_done, $check_perl_lib, 
$get_perl_versions, $on_get_perl_versions) ;
+    my ($on_perl_check_done, $check_perl_lib, $get_perl_versions, 
$on_get_perl_versions) ;
 
     my ($v_normal) ;
 
-    # check version for the first available version in Debian: debian
-    # dep may have no version specified but older versions can be found
-    # in CPAN that were never packaged in Debian
-    $on_get_lib_version = sub {
-        $async_log->debug("on_get_lib_version called with @_") ;
-        # get_available_version returns oldest first, like (etch,1.2,...)
-        my ($oldest_debian_with_lib,$oldest_lib_version_in_debian) = @_[0,1] ;
-        if (not defined $oldest_lib_version_in_debian or not defined 
$oldest_debian_with_lib) {
-             # no need to check further. Call send to unblock wait done with 
recv
-            return;
-        }
-        # lob off debian release number
-        $oldest_lib_version_in_debian =~ s/-.*//;
-        my $check_v = $dep_v ;
-        # use oldest version only if the oldest version is NOT in oldstable
-               # unfortunately this is fragile and must be modified after each 
Debian
-               # release
-        if ($oldest_debian_with_lib =~ /wheezy|jessie|sid/) {
-            $check_v ||= $oldest_lib_version_in_debian ;
-            $logger->debug("dual life $dep_name has oldest debian 
$oldest_lib_version_in_debian, using $check_v");
-        }
-
-        my ($cpan_dep_v, $epoch_dep_v) ;
-
-        ($cpan_dep_v, $epoch_dep_v) = reverse split /:/ ,$check_v if defined 
$check_v ;
-        my $v_decimal = Module::CoreList->first_release(
-            $dep_name_as_perl[0],
-            version->parse( $cpan_dep_v )
-        );
-
-        if (defined $v_decimal) {
-            $v_normal = version->new($v_decimal)->normal;
-            $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 aka $dep_name_as_perl[0] 
found in Perl core $v_normal");
-            }
-            my @res = $self->check_versioned_dep(  ['perl', '>=', $v_normal] );
-                       $on_perl_check_done->(@res);
-        }
-    };
-
 
     $on_perl_check_done =  sub {
         my $has_older_perl = shift ;
@@ -582,7 +540,48 @@ sub check_perl_lib_dep {
 
     # start the whole async stuff
     my @res = $self->get_available_version( $dep_name);
-       $on_get_lib_version->(@res) ;
+
+    # check version for the first available version in Debian: debian
+    # dep may have no version specified but older versions can be found
+    # in CPAN that were never packaged in Debian
+
+       # get_available_version returns oldest first, like (etch,1.2,...)
+       my ($oldest_debian_with_lib,$oldest_lib_version_in_debian) = @res[0,1] ;
+       if (not defined $oldest_lib_version_in_debian or not defined 
$oldest_debian_with_lib) {
+               # no need to check further.
+               return 1;
+       }
+
+       # lob off debian release number
+       $oldest_lib_version_in_debian =~ s/-.*//;
+       my $check_v = $dep_v ;
+
+       # use oldest version only if the oldest version is NOT in oldstable
+       # unfortunately this is fragile and must be modified after each Debian
+       # release
+       if ($oldest_debian_with_lib =~ /wheezy|jessie|sid/) {
+               $check_v ||= $oldest_lib_version_in_debian ;
+               $logger->debug("dual life $dep_name has oldest debian 
$oldest_lib_version_in_debian, using $check_v");
+       }
+
+       my ($cpan_dep_v, $epoch_dep_v) ;
+
+       ($cpan_dep_v, $epoch_dep_v) = reverse split /:/ ,$check_v if defined 
$check_v ;
+       my $v_decimal = Module::CoreList->first_release(
+               $dep_name_as_perl[0],
+               version->parse( $cpan_dep_v )
+       );
+
+       if (defined $v_decimal) {
+               $v_normal = version->new($v_decimal)->normal;
+               $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 aka 
$dep_name_as_perl[0] found in Perl core $v_normal");
+               }
+               my @res = $self->check_versioned_dep(  ['perl', '>=', 
$v_normal] );
+               $on_perl_check_done->(@res);
+       }
 
     return $ret ;
 }

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

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to