aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-07 14:44:20 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-07 14:44:20 +0000
commitdffbdd1a7bcf1feb2f35624cb46e58d9bd80a324 (patch)
tree6db098f34562a2cc4b91d16b94ca28392706c650 /Rpmdrake
parent030424259716e61d2c4ff34911bf587631615816 (diff)
downloadrpmdrake-dffbdd1a7bcf1feb2f35624cb46e58d9bd80a324.tar
rpmdrake-dffbdd1a7bcf1feb2f35624cb46e58d9bd80a324.tar.gz
rpmdrake-dffbdd1a7bcf1feb2f35624cb46e58d9bd80a324.tar.bz2
rpmdrake-dffbdd1a7bcf1feb2f35624cb46e58d9bd80a324.tar.xz
rpmdrake-dffbdd1a7bcf1feb2f35624cb46e58d9bd80a324.zip
fix wrong count number while dowloading packages and sync messages with urpmi/gurpmi ones (#29237)
Diffstat (limited to 'Rpmdrake')
-rwxr-xr-xRpmdrake/pkg.pm16
1 files changed, 11 insertions, 5 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 01e95bb3..35798567 100755
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -467,7 +467,6 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
$state->{selected},
clean_all => 0
);
- my $distant_number = scalar keys %$state;
if (!$local_sources && (!$list || !@$list)) {
interactive_msg(
N("Unable to get source packages."),
@@ -508,7 +507,6 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
my $_guard = before_leaving { urpm::removable::try_umounting_removables($urpm) };
Rpmdrake::gurpm::init(1 ? N("Please wait") : N("Package installation..."), N("Initializing..."), transient => $::w->{real_window});
- my $distant_progress;
my $canceled;
my (@errors);
my $something_installed;
@@ -564,12 +562,20 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
\%transaction_sources,
\%error_sources,
callback => sub {
- my ($mode, $file, $percent) = @_;
+ my ($mode, $file, $percent, $total, $eta, $speed) = @_;
if ($mode eq 'start') {
- Rpmdrake::gurpm::label(N("Downloading package `%s' (%s/%s)...",
- basename($file), ++$distant_progress, $distant_number));
+ Rpmdrake::gurpm::label(N("Downloading package `%s'...", basename($file)));
Rpmdrake::gurpm::validate_cancel(but(N("Cancel")), sub { $canceled = 1 });
} elsif ($mode eq 'progress') {
+ Rpmdrake::gurpm::label(
+ join("\n",
+ N("Downloading package `%s'...", basename($file)),
+ (defined $total && defined $eta ?
+ N(" %s%% of %s completed, ETA = %s, speed = %s", $percent, $total, $eta, $speed)
+ : N(" %s%% completed, speed = %s", $percent, $speed)
+ ) =~ /^\s*(.*)/
+ ),
+ );
Rpmdrake::gurpm::progress($percent/100);
} elsif ($mode eq 'end') {
Rpmdrake::gurpm::progress(1);