index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Pierre <pierre@spotify.com> | 2012-04-02 04:16:28 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-04-07 11:16:58 -0500 |
commit | 0145604728360acaf56e6d50bc03e78bfab7585c (patch) | |
tree | 339770a8e0430086c48a13cd40358c567b1ed4d3 /src | |
parent | b5b9860a2e7f73b0445131a51006c8c95f1f1b91 (diff) |
-rw-r--r-- | src/pacman/sync.c | 8 |
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 74e417c4..5165dca1 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -420,7 +420,7 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets) static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets) { - alpm_list_t *i, *j, *k; + alpm_list_t *i, *j, *k, *s = NULL; if(targets) { for(i = targets; i; i = alpm_list_next(i)) { @@ -456,10 +456,14 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets) } } else { /* print grp names only, no package names */ - printf("%s\n", grp->name); + if(!alpm_list_find_str (s, grp->name)) { + s = alpm_list_add (s, grp->name); + printf("%s\n", grp->name); + } } } } + alpm_list_free(s); } return 0; |