xbps_rpool_foreach: take into account xbps_repo_open returning NULL.
This commit is contained in:
parent
56ab438d3c
commit
8ad8bca958
@ -105,9 +105,10 @@ xbps_rpool_foreach(struct xbps_handle *xhp,
|
|||||||
|
|
||||||
for (unsigned int i = 0; i < xbps_array_count(xhp->repositories); i++) {
|
for (unsigned int i = 0; i < xbps_array_count(xhp->repositories); i++) {
|
||||||
xbps_array_get_cstring_nocopy(xhp->repositories, i, &repouri);
|
xbps_array_get_cstring_nocopy(xhp->repositories, i, &repouri);
|
||||||
repo = xbps_rpool_get_repo(repouri);
|
if ((repo = xbps_rpool_get_repo(repouri)) == NULL) {
|
||||||
if (!repo) {
|
|
||||||
repo = xbps_repo_open(xhp, repouri, false);
|
repo = xbps_repo_open(xhp, repouri, false);
|
||||||
|
if (!repo)
|
||||||
|
continue;
|
||||||
SIMPLEQ_INSERT_TAIL(&rpool_queue, repo, entries);
|
SIMPLEQ_INSERT_TAIL(&rpool_queue, repo, entries);
|
||||||
xbps_dbg_printf(xhp, "[rpool] `%s' registered.\n", repouri);
|
xbps_dbg_printf(xhp, "[rpool] `%s' registered.\n", repouri);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user