[Frugalware-git] pacman-g2: -Sg: don't return an error if not all repos contain a given group
Miklos Vajna
vmiklos at frugalware.org
Tue May 4 19:05:56 CEST 2010
Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=ab6bee962956f0187d5132b45b09cad9e47e6abc
commit ab6bee962956f0187d5132b45b09cad9e47e6abc
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Tue May 4 19:02:03 2010 +0200
-Sg: don't return an error if not all repos contain a given group
diff --git a/src/pacman-g2/sync.c b/src/pacman-g2/sync.c
index 4311e4c..c5b3781 100644
--- a/src/pacman-g2/sync.c
+++ b/src/pacman-g2/sync.c
@@ -122,9 +122,11 @@ static int sync_search(list_t *syncs, list_t *targets)
static int sync_group(int level, list_t *syncs, list_t *targets)
{
list_t *i, *j;
+ int ret = 0;
if(targets) {
for(i = targets; i; i = i->next) {
+ int found = 0;
for(j = syncs; j; j = j->next) {
PM_DB *db = j->data;
PM_GRP *grp = pacman_db_readgrp(db, i->data);
@@ -132,11 +134,13 @@ static int sync_group(int level, list_t *syncs, list_t *targets)
if(grp) {
MSG(NL, "%s\n", (char *)pacman_grp_getinfo(grp, PM_GRP_NAME));
PM_LIST_display(" ", pacman_grp_getinfo(grp, PM_GRP_PKGNAMES));
- } else {
- ERR(NL, _("group \"%s\" was not found\n"), (char *)i->data);
- return(1);
+ found = 1;
}
}
+ if (!found) {
+ ERR(NL, _("group \"%s\" was not found\n"), (char *)i->data);
+ ret = 1;
+ }
}
} else {
for(j = syncs; j; j = j->next) {
@@ -154,7 +158,7 @@ static int sync_group(int level, list_t *syncs, list_t *targets)
}
}
- return(0);
+ return(ret);
}
static int sync_info(list_t *syncs, list_t *targets)
More information about the Frugalware-git
mailing list