1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 07:48:50 -05:00

Remove redundant transaction size output

Printing all of "Installed", "Removed" and "Net Upgrade" sizes is
redundant as the difference of the first two is the last. Instead,
only print "Installed Size" and "Net Upgrade Size" when both the
installed and removed are non-zero.

This results in the following output in the following cases:
 - package installation only: Installed Size
 - package removal only: Removed Size
 - package installation involving replacement: Installed + Net Upgrade Size
 - package upgrade: Installed + Net Upgrade Size
 - combination upgrade and installation: Installed + Net Upgrade Size

Download Size remains outputted whenever something is downloaded.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2011-09-29 21:13:22 +10:00 committed by Dan McGee
parent 83c05e71bc
commit 6dfb9d35f8

View File

@ -892,7 +892,7 @@ static void _display_targets(alpm_list_t *targets, int verbose)
size = humanize_size(isize, 'M', &label);
printf(_("Total Installed Size: %.2f %s\n"), size, label);
}
if(rsize > 0) {
if(rsize > 0 && isize == 0) {
size = humanize_size(rsize, 'M', &label);
printf(_("Total Removed Size: %.2f %s\n"), size, label);
}