summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-08-09 09:36:20 +0200
committerDan McGee <dan@archlinux.org>2007-08-12 21:18:44 -0400
commitf2c7187e432a3abc732d53e0a9d95f44f9338535 (patch)
tree0ab7db846d9ed2278d6ca00b90ec6d4627cac6a7
parent3a0a4db12936199efd0ee1714b7219fab3d83392 (diff)
downloadpacman-f2c7187e432a3abc732d53e0a9d95f44f9338535.tar.xz
pacman/sync.c : return 0 on succesful search, 1 otherwise.
Closes FS#7690. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
-rw-r--r--src/pacman/sync.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 800738d3..b02ecde1 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -228,6 +228,7 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets)
{
alpm_list_t *i, *j, *ret;
int freelist;
+ int found = 0;
for(i = syncs; i; i = alpm_list_next(i)) {
pmdb_t *db = alpm_list_getdata(i);
@@ -241,6 +242,8 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets)
}
if(ret == NULL) {
continue;
+ } else {
+ found = 1;
}
for(j = ret; j; j = alpm_list_next(j)) {
/* print repo/name (group) info about each package in our list */
@@ -275,7 +278,7 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets)
}
}
- return(0);
+ return(!found);
}
static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets)