summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-04-14 16:51:48 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-04-14 18:12:53 +0200
commit32c4bc874e3f7fc99188bf045902b1018f38855a (patch)
tree8aa3f1f37c65dddcd61fa33ef9e7f22c4bdc8926
parentf70a133918179fe01c205720687f16bb9bdc5652 (diff)
downloadurpmi-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
-rw-r--r--NEWS2
-rw-r--r--urpm/install.pm5
2 files changed, 6 insertions, 1 deletions
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");