From 32c4bc874e3f7fc99188bf045902b1018f38855a Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 14 Apr 2016 16:51:48 +0200 Subject: use new "elem" callback need URPM >= 5.07 --- NEWS | 2 ++ urpm/install.pm | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4fa6feb5..cc35af74 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ - add --deploops & --debug-librpm to bash completion - unset LD_PRELOAD in chroot (eg: for eatmydata) +- use new "elem" callback + (need URPM >= 5.07) Version 8.101 - 9 October 2015 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"); -- cgit v1.2.1