From 6de3c0f1fdc24f7d5468d98390a4f2355852de32 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Fri, 18 Nov 2022 18:28:55 -0500 Subject: [PATCH] lib/repo.c: add user-facing error message when repodata doesn't exist Instead of just cryptically exiting 0 when opening a non-existant repodata or stagedata, with the only message existing in the debug output, show an error to the user on stderr. mentioned in #519 --- lib/repo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/repo.c b/lib/repo.c index c4f19b2a..95acd906 100644 --- a/lib/repo.c +++ b/lib/repo.c @@ -246,6 +246,7 @@ repo_open_with_type(struct xbps_handle *xhp, const char *url, const char *name) int rv = errno; xbps_dbg_printf("[repo] `%s' open %s %s\n", repofile, name, strerror(rv)); + xbps_error_printf("%s: %s\n", strerror(rv), repofile); goto out; } if (repo_open_local(repo, repofile)) {