aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-26 11:13:50 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-26 11:13:50 +0000
commitd26ba49dac28c997f9283a7facb99bff549d65a1 (patch)
treeaa1406ca10431ce34f96af06c6a6bfacd6a11168 /Rpmdrake
parent29e40c6dcfa6d2713fc53e54bc763c13477cb82e (diff)
downloadrpmdrake-d26ba49dac28c997f9283a7facb99bff549d65a1.tar
rpmdrake-d26ba49dac28c997f9283a7facb99bff549d65a1.tar.gz
rpmdrake-d26ba49dac28c997f9283a7facb99bff549d65a1.tar.bz2
rpmdrake-d26ba49dac28c997f9283a7facb99bff549d65a1.tar.xz
rpmdrake-d26ba49dac28c997f9283a7facb99bff549d65a1.zip
(perform_removal) display a progress bar while removing packages
Diffstat (limited to 'Rpmdrake')
-rwxr-xr-xRpmdrake/pkg.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 1614bac9..5e9ea033 100755
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -804,10 +804,14 @@ sub perform_removal {
my $_a = before_leaving { Rpmdrake::gurpm::end() };
my $logger = $urpm->{log};
+ my $progress = -1;
local $urpm->{log} = sub {
my $str = $_[0];
print $str;
+ $progress++;
+ return if $progress <= 0; # skip first "creating transaction..." message
Rpmdrake::gurpm::label($str); # display "removing package %s"
+ Rpmdrake::gurpm::progress(min(0.99, scalar($progress/@toremove)));
gtkflush();
};