diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-04-14 16:51:48 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-04-14 18:12:53 +0200 |
commit | 32c4bc874e3f7fc99188bf045902b1018f38855a (patch) | |
tree | 8aa3f1f37c65dddcd61fa33ef9e7f22c4bdc8926 /urpm/install.pm | |
parent | f70a133918179fe01c205720687f16bb9bdc5652 (diff) | |
download | urpmi-32c4bc874e3f7fc99188bf045902b1018f38855a.tar urpmi-32c4bc874e3f7fc99188bf045902b1018f38855a.tar.gz urpmi-32c4bc874e3f7fc99188bf045902b1018f38855a.tar.bz2 urpmi-32c4bc874e3f7fc99188bf045902b1018f38855a.tar.xz urpmi-32c4bc874e3f7fc99188bf045902b1018f38855a.zip |
use new "elem" callback
need URPM >= 5.07
Diffstat (limited to 'urpm/install.pm')
-rw-r--r-- | urpm/install.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/urpm/install.pm b/urpm/install.pm index 6f88e494..7c32fa0a 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -120,7 +120,6 @@ sub install_logger { ++$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", '', ''; @@ -300,6 +299,10 @@ sub _get_callbacks { $options->{callback_uninst} ||= $options->{verbose} >= 0 ? \&install_logger : $erase_logger; + $options->{callback_elem} ||= sub { + my (undef, undef, undef, undef, $idx, undef) = @_; + $index = $idx; + }; $options->{callback_error} ||= sub { my ($urpm, undef, $id, $subtype, undef, undef, $fullname) = @_; $urpm->{error}("ERROR: '$subtype' failed for $fullname"); |