diff options
author | Nagy Gabor <ngaba@bibl.u-szeged.hu> | 2008-07-16 14:42:25 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-07-23 02:50:35 +0200 |
commit | 075b244be23aa788ae21e8c5d50cb99a1296c37f (patch) | |
tree | f7434d4532af4c753e7eab8728691525be8105f1 /src | |
parent | 69f00385a9932458ddad199e1b215aba989804af (diff) | |
download | pacman-075b244be23aa788ae21e8c5d50cb99a1296c37f.tar.gz pacman-075b244be23aa788ae21e8c5d50cb99a1296c37f.tar.xz |
-Sqg and -Qqg
With --quiet, "pacman -Sg grp" and "pacman -Qg grp" don't list group names.
Note that "pacman -Qgq" and "pacman -Sggq" (without targets) still list
group names becuase their output would not be very useful without them.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/query.c | 7 | ||||
-rw-r--r-- | src/pacman/sync.c | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c index 74d3ff21..bd2d8c5d 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -235,7 +235,12 @@ static int query_group(alpm_list_t *targets) if(grp) { const alpm_list_t *p, *packages = alpm_grp_get_pkgs(grp); for(p = packages; p; p = alpm_list_next(p)) { - printf("%s %s\n", grpname, alpm_pkg_get_name(alpm_list_getdata(p))); + if(!config->quiet) { + printf("%s %s\n", grpname, + alpm_pkg_get_name(alpm_list_getdata(p))); + } else { + printf("%s\n", alpm_pkg_get_name(alpm_list_getdata(p))); + } } } else { pm_fprintf(stderr, PM_LOG_ERROR, _("group \"%s\" was not found\n"), grpname); diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 78777fca..87bd5bec 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -357,8 +357,12 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets) if(grp) { /* get names of packages in group */ for(k = alpm_grp_get_pkgs(grp); k; k = alpm_list_next(k)) { - printf("%s %s\n", grpname, - alpm_pkg_get_name(alpm_list_getdata(k))); + if(!config->quiet) { + printf("%s %s\n", grpname, + alpm_pkg_get_name(alpm_list_getdata(k))); + } else { + printf("%s\n", alpm_pkg_get_name(alpm_list_getdata(k))); + } } } } |