[SCM] Debian native package for Config::Model::Dpkg branch, master, updated. debian/2.035-10-g90516db

Dominique Dumont dod at debian.org
Sat Apr 27 15:02:31 UTC 2013


The following commit has been merged in the master branch:
commit a20a161617fc7ce0c3918e3fd2d91b34beb16973
Author: Dominique Dumont <dod at debian.org>
Date:   Wed Apr 24 18:50:53 2013 +0200

    set up wait with condvar in check_or_fix_pkg_name

diff --git a/lib/Config/Model/Dpkg/Dependency.pm b/lib/Config/Model/Dpkg/Dependency.pm
index dc0d5d3..5f93e04 100644
--- a/lib/Config/Model/Dpkg/Dependency.pm
+++ b/lib/Config/Model/Dpkg/Dependency.pm
@@ -70,7 +70,7 @@ pkg_dep: pkg_name dep_version arch_restriction(?) {
    } 
  | pkg_name arch_restriction(?) {
     my @dep_info = ( $item{pkg_name} ) ;
-    $arg[0]->check_or_fix_pkg_name($arg[2], \@dep_info) ;
+    $arg[0]->check_or_fix_pkg_name(@arg[1..2], \@dep_info) ; # async
     $arg[0]->check_or_fix_essential_package($arg[2], \@dep_info) ;
     $return = \@dep_info ;
    }
@@ -531,7 +531,7 @@ my %pkg_replace = (
 ) ;
 
 sub check_or_fix_pkg_name {
-    my ( $self, $apply_fix, $dep_info ) = @_;
+    my ( $self, $pending_check_cv, $apply_fix, $dep_info ) = @_;
     my ( $pkg,  $oper,      $vers )    = @$dep_info;
     $logger->debug("called with @$dep_info");
 
@@ -561,8 +561,13 @@ sub check_or_fix_pkg_name {
             $logger->debug("unknown package $pkg") ;
             $self->add_warning("package $pkg is unknown. Check for typos if not a virtual package.") ;
         }
+        $async_log->debug("callback for check_or_fix_pkg_name -> end") ;
+        $pending_check_cv->end ;
     } ;
    
+    # is asynchronous
+    $async_log->debug("begin") ;
+    $pending_check_cv->begin ;
     $self->get_available_version($cb,$pkg ) ;
     # if no pkg was found
 }
@@ -578,7 +583,7 @@ sub check_or_fix_dep {
         return;
     }
 
-    $self->check_or_fix_pkg_name($apply_fix, $dep_info) ;
+    $self->check_or_fix_pkg_name($pending_check_cv, $apply_fix, $dep_info) ;
 
     my $cb = sub {
         my ( $vers_dep_ok, @list ) = @_ ;
@@ -613,9 +618,6 @@ sub warn_or_remove_vers_dep {
     }
 }
 
-__PACKAGE__->meta->make_immutable;
-
-
 use vars qw/%cache/ ;
 
 # Set up persistence

-- 
Debian native package for Config::Model::Dpkg



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