[libconfig-model-dpkg-perl] 11/24: check_or_fix_dep is now synchronous

dod at debian.org dod at debian.org
Sun Apr 20 13:07:46 UTC 2014


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 234a292014b8dea589a065d416d6e4f5453b8ee5
Author: Dominique Dumont <dod at debian.org>
Date:   Tue Apr 15 21:11:33 2014 +0200

    check_or_fix_dep is now synchronous
---
 lib/Config/Model/Dpkg/Dependency.pm | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/lib/Config/Model/Dpkg/Dependency.pm b/lib/Config/Model/Dpkg/Dependency.pm
index 36cb655..aa5b880 100644
--- a/lib/Config/Model/Dpkg/Dependency.pm
+++ b/lib/Config/Model/Dpkg/Dependency.pm
@@ -294,7 +294,7 @@ sub check_dependency {
         next unless ref($dep) ; # no need to check variables
         my $cb = sub {
             $self->check_or_fix_essential_package($apply_fix, $dep, $old) ; # sync
-            $self->check_or_fix_dep($apply_fix, $dep, $old, sub { }) ;
+            $self->check_or_fix_dep($apply_fix, $dep, $old) ;
         };
         $self->check_or_fix_pkg_name($apply_fix, $dep, $old, $cb) ; # async
     }
@@ -728,9 +728,8 @@ sub check_or_fix_pkg_name {
     }
 }
 
-# all subs but one there are synchronous
 sub check_or_fix_dep {
-    my ( $self, $apply_fix, $dep_info, $old, $next ) = @_;
+    my ( $self, $apply_fix, $dep_info, $old ) = @_;
     my ( $pkg,  $oper,      $vers, @archs )    = @$dep_info;
 
     $logger->debug("called with '", scalar $self->struct_to_dep($dep_info), "' and fix $apply_fix")
@@ -738,25 +737,13 @@ sub check_or_fix_dep {
 
     if(not defined $pkg) {
         # pkg may be cleaned up during fix
-        $next->() ;
     }
     elsif ( $pkg eq 'debhelper' ) {
         $self->check_debhelper_version( $apply_fix, $dep_info );
-        $next->() ;
     }
     else {
-        my $cb = sub {
-            my ( $vers_dep_ok, @list ) = @_ ;
-            $async_log->debug("callback for check_or_fix_dep with @_") ;
-            $self->warn_or_remove_vers_dep ($apply_fix, $dep_info, \@list) unless $vers_dep_ok ;
-
-            $async_log->debug("callback for check_or_fix_dep -> end") ;
-            $next->() ;
-        } ;
-
-        $async_log->debug("begin") ;
-        my @res = $self->check_versioned_dep( $dep_info );
-		$cb->(@res);
+		my ( $vers_dep_ok, @list ) =  $self->check_versioned_dep( $dep_info );
+		$self->warn_or_remove_vers_dep ($apply_fix, $dep_info, \@list) unless $vers_dep_ok ;
     }
 }
 

-- 
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