summaryrefslogtreecommitdiffstats
path: root/src/pacman/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/sync.c')
-rw-r--r--src/pacman/sync.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index d04c7da9..8626393e 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -245,18 +245,15 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets)
alpm_list_t *grp;
pmpkg_t *pkg = alpm_list_getdata(j);
- /* print the package size with the output if -z option passed */
- if(config->showsize) {
+ printf("%s/%s %s", alpm_db_get_name(db), alpm_pkg_get_name(pkg),
+ alpm_pkg_get_version(pkg));
+
+ /* print the package size with the output if ShowSize option set */
+ if(alpm_option_get_showsize()) {
/* Convert byte size to MB */
double mbsize = alpm_pkg_get_size(pkg) / (1024.0 * 1024.0);
- printf("%s/%s %s [%.2f MB]", alpm_db_get_name(db),
- alpm_pkg_get_name(pkg),
- alpm_pkg_get_version(pkg), mbsize);
- } else {
- printf("%s/%s %s", alpm_db_get_name(db),
- alpm_pkg_get_name(pkg),
- alpm_pkg_get_version(pkg));
+ printf(" [%.2f MB]", mbsize);
}
if((grp = alpm_pkg_get_groups(pkg)) != NULL) {