From 6dfb9d35f8601c3752dc5bd0e8558c48f41a8215 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Thu, 29 Sep 2011 21:13:22 +1000 Subject: 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 Signed-off-by: Dan McGee --- src/pacman/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pacman/util.c b/src/pacman/util.c index c3836a5e..79fb54dc 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -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); } -- cgit v1.2.3-24-g4f1b