xbps-repo: more meaningful messages for the show{,-deps,-files} targets.
This commit is contained in:
@ -170,11 +170,13 @@ main(int argc, char **argv)
|
|||||||
usage();
|
usage();
|
||||||
|
|
||||||
rv = show_pkg_info_from_repolist(argv[1]);
|
rv = show_pkg_info_from_repolist(argv[1]);
|
||||||
if (rv == 0 && errno == ENOENT) {
|
if (rv == ENOENT) {
|
||||||
xbps_error_printf("xbps-repo: unable to locate "
|
xbps_printf("Unable to locate package "
|
||||||
"`%s' from repository pool: %s\n", argv[1],
|
"`%s' in repository pool.\n", argv[1]);
|
||||||
strerror(rv));
|
goto out;
|
||||||
rv = EINVAL;
|
} else if (rv != 0 && rv != ENOENT) {
|
||||||
|
xbps_error_printf("xbps-repo: unexpected error '%s' ",
|
||||||
|
"searching for '%s'\n", strerror(rv), argv[1]);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,11 +186,13 @@ main(int argc, char **argv)
|
|||||||
usage();
|
usage();
|
||||||
|
|
||||||
rv = show_pkg_deps_from_repolist(argv[1]);
|
rv = show_pkg_deps_from_repolist(argv[1]);
|
||||||
if (rv == 0 && errno == ENOENT) {
|
if (rv == ENOENT) {
|
||||||
xbps_error_printf("xbps-repo: unable to locate "
|
xbps_printf("Unable to locate package "
|
||||||
"`%s' from repository pool: %s\n", argv[1],
|
"`%s' in repository pool.\n", argv[1]);
|
||||||
strerror(rv));
|
goto out;
|
||||||
rv = EINVAL;
|
} else if (rv != 0 && rv != ENOENT) {
|
||||||
|
xbps_error_printf("xbps-repo: unexpected error '%s' "
|
||||||
|
"searching for '%s'\n", strerror(errno), argv[1]);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +209,7 @@ main(int argc, char **argv)
|
|||||||
"error '%s' searching for '%s'\n",
|
"error '%s' searching for '%s'\n",
|
||||||
strerror(errno), argv[1]);
|
strerror(errno), argv[1]);
|
||||||
} else {
|
} else {
|
||||||
xbps_error_printf("xbps-repo: `%s' not found "
|
xbps_printf("Unable to locate package `%s' "
|
||||||
"in repository pool.\n", argv[1]);
|
"in repository pool.\n", argv[1]);
|
||||||
}
|
}
|
||||||
rv = errno;
|
rv = errno;
|
||||||
|
Reference in New Issue
Block a user