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:
@@ -224,6 +224,8 @@ install_new_pkg(struct xbps_handle *xhp, const char *pkg, bool reinstall)
|
||||
} else if (rv == ENOTSUP) {
|
||||
fprintf(stderr, "No repositories "
|
||||
"currently registered!\n");
|
||||
} else if (rv == ENXIO) {
|
||||
fprintf(stderr, "Package `%s' contains invalid dependencies, exiting.\n", pkg);
|
||||
} else {
|
||||
fprintf(stderr, "Unexpected error: %s\n",
|
||||
strerror(rv));
|
||||
|
||||
Reference in New Issue
Block a user