diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-03-20 18:05:19 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-03-20 18:05:19 +0000 |
commit | dfdf806fffede8afc112e1a6f1ff6130b9feb238 (patch) | |
tree | 26db1fbfbc8625af33ce814055217c96c99b05ee | |
parent | a8e5b2a614ff0f0be437f5056a8c54e9644857cf (diff) | |
download | urpmi-dfdf806fffede8afc112e1a6f1ff6130b9feb238.tar urpmi-dfdf806fffede8afc112e1a6f1ff6130b9feb238.tar.gz urpmi-dfdf806fffede8afc112e1a6f1ff6130b9feb238.tar.bz2 urpmi-dfdf806fffede8afc112e1a6f1ff6130b9feb238.tar.xz urpmi-dfdf806fffede8afc112e1a6f1ff6130b9feb238.zip |
Count correctly even when repackaging
-rw-r--r-- | urpm.pm | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) { |