index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | morganamilo <morganamilo@gmail.com> | 2018-10-20 14:58:52 +0100 |
---|---|---|
committer | Andrew Gregory <andrew.gregory.8@gmail.com> | 2018-10-20 12:07:48 -0700 |
commit | 8c9046e6042fd23bf6a1bb204062fc644c322689 (patch) | |
tree | c13d107f10244d5579293dbf4e70d4a704f4f48b | |
parent | afb9c0140fd6949ede64cc1a304e9349772fca04 (diff) |
-rw-r--r-- | src/pacman/sync.c | 18 |
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index ef8faedf..57677a42 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -535,6 +535,20 @@ static int process_pkg(alpm_pkg_t *pkg) return 0; } +static int group_exists(alpm_list_t *dbs, const char *name) +{ + alpm_list_t *i; + for(i = dbs; i; i = i->next) { + alpm_db_t *db = i->data; + + if(alpm_db_get_group(db, name)) { + return 1; + } + } + + return 0; +} + static int process_group(alpm_list_t *dbs, const char *group, int error) { int ret = 0; @@ -543,6 +557,10 @@ static int process_group(alpm_list_t *dbs, const char *group, int error) int count = alpm_list_count(pkgs); if(!count) { + if(group_exists(dbs, group)) { + return 0; + } + pm_printf(ALPM_LOG_ERROR, _("target not found: %s\n"), group); return 1; } |