Add [installed] information to -Sg/-Sgg output
This allows users to easily check which packages in a group are installed (or not). Signed-off-by: Taro Tanaka <mkrmdk@gmail.com>
This commit is contained in:
parent
d35728f924
commit
b25152dd46
1 changed files with 7 additions and 2 deletions
|
@ -329,6 +329,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, *s = NULL;
|
||||
alpm_db_t *db_local = alpm_get_localdb(config->handle);
|
||||
int ret = 0;
|
||||
|
||||
if(targets) {
|
||||
|
@ -345,8 +346,10 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets)
|
|||
/* get names of packages in group */
|
||||
for(k = grp->packages; k; k = alpm_list_next(k)) {
|
||||
if(!config->quiet) {
|
||||
printf("%s %s\n", grpname,
|
||||
printf("%s %s", grpname,
|
||||
alpm_pkg_get_name(k->data));
|
||||
print_installed(db_local, k->data);
|
||||
printf("\n");
|
||||
} else {
|
||||
printf("%s\n", alpm_pkg_get_name(k->data));
|
||||
}
|
||||
|
@ -368,8 +371,10 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets)
|
|||
|
||||
if(level > 1) {
|
||||
for(k = grp->packages; k; k = alpm_list_next(k)) {
|
||||
printf("%s %s\n", grp->name,
|
||||
printf("%s %s", grp->name,
|
||||
alpm_pkg_get_name(k->data));
|
||||
print_installed(db_local, k->data);
|
||||
printf("\n");
|
||||
}
|
||||
} else {
|
||||
/* print grp names only, no package names */
|
||||
|
|
Loading…
Add table
Reference in a new issue