diff options
Diffstat (limited to 'src/pacman/sync.c')
-rw-r--r-- | src/pacman/sync.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 5f2451a8..5c627393 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -351,10 +351,18 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets) } if (!config->quiet) { - /* TODO package in multiple groups needs to be handled, do a loop */ if((grp = alpm_pkg_get_groups(pkg)) != NULL) { - const char *group = alpm_list_getdata(grp); - printf(" (%s)", group); + alpm_list_t *k; + printf(" ("); + for(k = grp; k; k = alpm_list_next(k)) { + const char *group = alpm_list_getdata(k); + printf("%s", group); + if(alpm_list_next(k)) { + /* only print a spacer if there are more groups */ + printf(" "); + } + } + printf(")"); } /* we need a newline and initial indent first */ |