Quiet ShowSize with -Ss and -Qs

This fixes FS#15923

PS : duplicated code ftw

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Xavier Chantry 2009-08-18 17:23:47 +02:00 committed by Dan McGee
parent 14a93b2e43
commit 600782853a
2 changed files with 2 additions and 2 deletions

View file

@ -172,7 +172,7 @@ static int query_search(alpm_list_t *targets)
} }
/* print the package size with the output if ShowSize option set */ /* print the package size with the output if ShowSize option set */
if(config->showsize) { if(!config->quiet && config->showsize) {
/* Convert byte size to MB */ /* Convert byte size to MB */
double mbsize = (double)alpm_pkg_get_size(pkg) / (1024.0 * 1024.0); double mbsize = (double)alpm_pkg_get_size(pkg) / (1024.0 * 1024.0);

View file

@ -308,7 +308,7 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets)
} }
/* print the package size with the output if ShowSize option set */ /* print the package size with the output if ShowSize option set */
if(config->showsize) { if(!config->quiet && config->showsize) {
/* Convert byte size to MB */ /* Convert byte size to MB */
double mbsize = alpm_pkg_get_size(pkg) / (1024.0 * 1024.0); double mbsize = alpm_pkg_get_size(pkg) / (1024.0 * 1024.0);