summaryrefslogtreecommitdiffstats
path: root/urpm/install.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/install.pm')
-rw-r--r--urpm/install.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/urpm/install.pm b/urpm/install.pm
index e6f120d1..0e132484 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -115,11 +115,11 @@ sub install_logger {
$pname = N("removing %s", $urpm->{trans}->Element_fullname($index));
$erase_logger->($urpm, undef, undef, $subtype);
} else {
- # index already got bumped in {callback_open}:
- $pname = $urpm->{trans}->Element_name($index-1);
+ $pname = $urpm->{trans}->Element_name($index);
++$urpm->{logger_count} if $pname;
$cnt = $pname ? $urpm->{logger_count} : '-';
}
+ $index++;
my $s = sprintf("%9s: %-22s", $cnt . "/" . $total_pkg, $pname);
print $s;
$s =~ / $/ or printf "\n%9s %-22s", '', '';
@@ -266,7 +266,6 @@ sub _get_callbacks {
my ($callback_open_helper, $callback_close_helper) = ($options->{callback_open_helper}, $options->{callback_close_helper});
$options->{callback_open} = sub {
my ($_data, $_type, $id) = @_;
- $index++;
$callback_open_helper and $callback_open_helper->(@_);
$fh = urpm::sys::open_safe($urpm, '<', $install->{$id} || $upgrade->{$id});
$fh ? fileno $fh : undef;
@@ -295,7 +294,6 @@ sub _get_callbacks {
} else {
$urpm->{print}(N("removing package %s", $fullname)) if $verbose >= 0;
}
- $index++;
}
};