summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-31 16:45:26 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-31 16:45:26 +0000
commitdb03b9af4f0658271f3841eb3273f1447a4f46a9 (patch)
tree28449a2526b10d7b51c1014882bd1b43f886b635
parentccb2bd42f9decd08f4e682bedd74c026a3833289 (diff)
downloadurpmi-db03b9af4f0658271f3841eb3273f1447a4f46a9.tar
urpmi-db03b9af4f0658271f3841eb3273f1447a4f46a9.tar.gz
urpmi-db03b9af4f0658271f3841eb3273f1447a4f46a9.tar.bz2
urpmi-db03b9af4f0658271f3841eb3273f1447a4f46a9.tar.xz
urpmi-db03b9af4f0658271f3841eb3273f1447a4f46a9.zip
(do_install_3,sync_logger) make it obvious that parameters do be used
-rwxr-xr-xgurpmi25
-rw-r--r--urpm/download.pm4
2 files changed, 5 insertions, 4 deletions
diff --git a/gurpmi2 b/gurpmi2
index b3474d30..ca1cee5c 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -348,13 +348,14 @@ sub do_install_3 () {
1;
},
trans_log => sub {
- my ($mode, $file, $percent, $_total, $_eta, $_speed) = @_;
+ my ($mode, $file, $percent, $total, $eta, $speed) = @_;
urpm::download::sync_logger(@_);
if (member($mode, 'start', 'progress')) {
$file =~ s|/*\s*$||; $file =~ s|.*/||;
- $progress_label->set_label(N("Downloading package `%s'...", $file) . "\n" . &urpm::download::progress_text);
+ $progress_label->set_label(N("Downloading package `%s'...", $file) . "\n" .
+ &urpm::download::progress_text($mode, $file, $percent, $total, $eta, $speed));
}
if ($mode eq 'start') {
$download_nb++;
diff --git a/urpm/download.pm b/urpm/download.pm
index f56928c6..62a9c5ac 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -843,11 +843,11 @@ Default logger (callback) suitable for sync operation on STDERR only.
=cut
sub sync_logger {
- my ($mode, $file, $percent, $_total, $_eta, $_speed) = @_;
+ my ($mode, $file, $percent, $total, $eta, $speed) = @_;
if ($mode eq 'start') {
print STDERR " $file\n";
} elsif ($mode eq 'progress') {
- my $text = &progress_text;
+ my $text = progress_text($mode, $file, $percent, $total, $eta, $speed);
if (length($text) > $wchar) { $text = substr($text, 0, $wchar) }
if (bytes::length($text) < $wchar) {
# clearing more than needed in case the terminal is not handling utf8 and we have a utf8 string