fulldeptree: replace another assert() with proper return code.

Signed-off-by: Juan RP <xtraeme@gmail.com>
This commit is contained in:
Juan RP 2019-06-15 18:15:13 +02:00
parent a9a889c54d
commit 271601dd0e
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368

View File

@ -177,6 +177,12 @@ ordered_depends(struct xbps_handle *xhp, xbps_dictionary_t pkgd, bool rpool)
if (xitem == NULL)
xitem = ordered_depends(xhp, curpkgd, rpool);
if (xitem == NULL) {
/* package depends on missing dependencies */
xbps_dbg_printf(xhp, "%s: missing dependency '%s'\n", pkgver, curdep);
errno = ENODEV;
return NULL;
}
assert(xitem);
addDepn(item, xitem);
free(curdepname);