summaryrefslogtreecommitdiffstats
path: root/perl-install/install/pkgs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install/pkgs.pm')
-rw-r--r--perl-install/install/pkgs.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index 57a7f162f..c859fb880 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -865,11 +865,27 @@ sub _install_raw {
log::l("rpm transactions start");
+ my ($is_installing, $verify_just_closed);
my $exit_code = urpm::main_loop::run($packages, $packages->{state}, undef, undef, {
open_helper => $callback,
+ verify => sub {
+ my ($_data, $_cb_type, $_pkg_id, $subtype, $_amout, $_total, $_pkg_name) = @_;
+ if ($subtype eq 'start') {
+ $is_installing = 0;
+ } elsif ($subtype eq 'stop') {
+ $is_installing = 1;
+ $verify_just_closed = 1;
+ }
+ },
close_helper => sub {
my ($db, $packages, $_type, $id) = @_;
&$callback;
+ # ignore first close after end of verify:
+ if ($is_installing && $verify_just_closed) {
+ undef $verify_just_closed;
+ return;
+ }
+ return if !$is_installing; # don't check if it's installed if it's being verified
my $pkg = defined $id && $packages->{depslist}[$id] or return;
print $LOG $pkg->fullname . "\n";
my $check_installed = is_package_installed($db, $pkg);