-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>
This commit is contained in:
parent
69f00385a9
commit
075b244be2
2 changed files with 12 additions and 3 deletions
|
@ -235,7 +235,12 @@ static int query_group(alpm_list_t *targets)
|
||||||
if(grp) {
|
if(grp) {
|
||||||
const alpm_list_t *p, *packages = alpm_grp_get_pkgs(grp);
|
const alpm_list_t *p, *packages = alpm_grp_get_pkgs(grp);
|
||||||
for(p = packages; p; p = alpm_list_next(p)) {
|
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 {
|
} else {
|
||||||
pm_fprintf(stderr, PM_LOG_ERROR, _("group \"%s\" was not found\n"), grpname);
|
pm_fprintf(stderr, PM_LOG_ERROR, _("group \"%s\" was not found\n"), grpname);
|
||||||
|
|
|
@ -357,8 +357,12 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets)
|
||||||
if(grp) {
|
if(grp) {
|
||||||
/* get names of packages in group */
|
/* get names of packages in group */
|
||||||
for(k = alpm_grp_get_pkgs(grp); k; k = alpm_list_next(k)) {
|
for(k = alpm_grp_get_pkgs(grp); k; k = alpm_list_next(k)) {
|
||||||
|
if(!config->quiet) {
|
||||||
printf("%s %s\n", grpname,
|
printf("%s %s\n", grpname,
|
||||||
alpm_pkg_get_name(alpm_list_getdata(k)));
|
alpm_pkg_get_name(alpm_list_getdata(k)));
|
||||||
|
} else {
|
||||||
|
printf("%s\n", alpm_pkg_get_name(alpm_list_getdata(k)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue