From 192d6166e9cb2a8f26d7256690e0158bd5a5d226 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 19 Sep 2018 14:30:37 +1200 Subject: User-visible log when validity check fails due to access Currently, if checking the validity of packages fails due to an access error on one or more packages, the user must sift through debug output in order to find the culprit package(s). This patch adds a call to _alpm_log in such a case to make the culprits more easily visible. Signed-off-by: Allan McRae --- lib/libalpm/sync.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/libalpm') diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 65a853dc..b6ae7b72 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -1190,6 +1190,11 @@ static int check_validity(alpm_handle_t *handle, case ALPM_ERR_PKG_INVALID_CHECKSUM: prompt_to_delete(handle, v->path, v->error); break; + case ALPM_ERR_PKG_NOT_FOUND: + case ALPM_ERR_BADPERMS: + case ALPM_ERR_PKG_OPEN: + _alpm_log(handle, ALPM_LOG_ERROR, _("failed to read file %s: %s\n"), v->path, alpm_strerror(v->error)); + break; default: /* ignore */ break; -- cgit v1.2.3-70-g09d2