Fix #43 (xbps-install: unhelpful message for invalid dependency)
If a package that is going to be installed or updated contains invalid dependencies return ENXIO and XBPS_STATE_INVALID_DEP xbps state to clients. This improves the error messages returned to the clients when such condition happens.
This commit is contained in:
@ -187,8 +187,10 @@ find_repo_deps(struct xbps_handle *xhp,
|
||||
}
|
||||
if (((pkgname = xbps_pkgpattern_name(reqpkg)) == NULL) &&
|
||||
((pkgname = xbps_pkg_name(reqpkg)) == NULL)) {
|
||||
xbps_dbg_printf(xhp, "can't guess pkgname for %s\n", reqpkg);
|
||||
rv = EINVAL;
|
||||
xbps_dbg_printf(xhp, "%s: can't guess pkgname for dependency: %s\n", curpkg, reqpkg);
|
||||
xbps_set_cb_state(xhp, XBPS_STATE_INVALID_DEP, ENXIO, NULL,
|
||||
"%s: can't guess pkgname for dependency '%s'", curpkg, reqpkg);
|
||||
rv = ENXIO;
|
||||
break;
|
||||
}
|
||||
/*
|
||||
|
Reference in New Issue
Block a user