summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-20 18:05:19 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-20 18:05:19 +0000
commitdfdf806fffede8afc112e1a6f1ff6130b9feb238 (patch)
tree26db1fbfbc8625af33ce814055217c96c99b05ee /urpm.pm
parenta8e5b2a614ff0f0be437f5056a8c54e9644857cf (diff)
downloadurpmi-dfdf806fffede8afc112e1a6f1ff6130b9feb238.tar
urpmi-dfdf806fffede8afc112e1a6f1ff6130b9feb238.tar.gz
urpmi-dfdf806fffede8afc112e1a6f1ff6130b9feb238.tar.bz2
urpmi-dfdf806fffede8afc112e1a6f1ff6130b9feb238.tar.xz
urpmi-dfdf806fffede8afc112e1a6f1ff6130b9feb238.zip
Count correctly even when repackaging
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 7cd0a631..b9262b0c 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2908,9 +2908,14 @@ sub install_logger {
$urpm->{logger_progress} = 0;
if ($type eq 'trans') {
$urpm->{logger_id} ||= 0;
+ $urpm->{logger_count} ||= 0;
printf("%-28s", N("Preparing..."));
} else {
- printf "%9s: %-22s", (++$urpm->{logger_id}) . "/" . $total_pkg, ($pkg && $pkg->name);
+ ++$urpm->{logger_id};
+ my $pname = $pkg ? $pkg->name : '';
+ ++$urpm->{logger_count} if $pname;
+ $pname ||= N("[repackaging]");
+ printf "%9s: %-22s", $urpm->{logger_count} . "/" . $total_pkg, $pname;
}
} elsif ($subtype eq 'stop') {
if ($urpm->{logger_progress} < $progress_size) {