Skip to content

Commit

Permalink
don't report not found on found packages
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
falconindy committed Jul 23, 2011
1 parent 20affa5 commit d818184
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion expac.c
Expand Up @@ -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, '/')) {
Expand All @@ -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);
}
}
Expand Down

0 comments on commit d818184

Please sign in to comment.