xbps_rpool_foreach: ignore invalid repos.
This commit is contained in:
parent
e6aade53a0
commit
fce411bac6
@ -336,9 +336,6 @@ xbps_repo_get_pkg_revdeps(struct xbps_repo *repo, const char *pkg)
|
|||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
bool match = false;
|
bool match = false;
|
||||||
|
|
||||||
if (repo->idx == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if (((pkgd = xbps_rpool_get_pkg(repo->xhp, pkg)) == NULL) &&
|
if (((pkgd = xbps_rpool_get_pkg(repo->xhp, pkg)) == NULL) &&
|
||||||
((pkgd = xbps_rpool_get_virtualpkg(repo->xhp, pkg)) == NULL)) {
|
((pkgd = xbps_rpool_get_virtualpkg(repo->xhp, pkg)) == NULL)) {
|
||||||
errno = ENOENT;
|
errno = ENOENT;
|
||||||
|
@ -158,6 +158,10 @@ xbps_rpool_foreach(struct xbps_handle *xhp,
|
|||||||
}
|
}
|
||||||
/* Iterate over repository pool */
|
/* Iterate over repository pool */
|
||||||
SIMPLEQ_FOREACH(rp, &rpool_queue, entries) {
|
SIMPLEQ_FOREACH(rp, &rpool_queue, entries) {
|
||||||
|
/* ignore invalid repos */
|
||||||
|
if (rp->repo->idx == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
rv = (*fn)(rp->repo, arg, &done);
|
rv = (*fn)(rp->repo, arg, &done);
|
||||||
if (rv != 0 || done)
|
if (rv != 0 || done)
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user