summaryrefslogtreecommitdiffstats
path: root/expac.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-07-23 13:44:56 -0400
committerDave Reisner <dreisner@archlinux.org>2011-07-23 13:44:56 -0400
commitd818184978270072b5416b008bea272de0a13591 (patch)
tree82e4cd5b454a500934b3920fdd01421847f81bfe /expac.c
parent20affa5f32162ddcff57fa14d806aca996b66b0f (diff)
downloadexpac-d818184978270072b5416b008bea272de0a13591.tar.xz
don't report not found on found packages
Use a flag var to declare found/notfound instead of looking at the pkg reference itself, which will be inevitably overwritten on each repo iteration.
Diffstat (limited to 'expac.c')
-rw-r--r--expac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/expac.c b/expac.c
index 57f1937..b261118 100644
--- a/expac.c
+++ b/expac.c
@@ -517,6 +517,7 @@ static alpm_list_t *resolve_pkg(alpm_list_t *targets) {
} else {
for (t = targets; t; t = alpm_list_next(t)) {
pmpkg_t *pkg = NULL;
+ int found = 0;
pkgname = reponame = alpm_list_getdata(t);
if (strchr(pkgname, '/')) {
@@ -537,12 +538,13 @@ static alpm_list_t *resolve_pkg(alpm_list_t *targets) {
continue;
}
+ found = 1;
ret = alpm_list_add(ret, pkg);
if (readone) {
break;
}
}
- if (!pkg && verbose) {
+ if (!found && verbose) {
fprintf(stderr, "error: package `%s' not found\n", pkgname);
}
}