1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

signing.c: check if needed files are readable

If we can't read the keyring, gpgme will output confusing debug
information and fail to verify the signature, so we should log some
debug information.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Florian Pritz 2011-07-06 17:24:19 +02:00 committed by Dan McGee
parent 29a96bcfe1
commit 89c070b263

View File

@ -118,6 +118,12 @@ static int init_gpgme(alpm_handle_t *handle)
sigdir = alpm_option_get_gpgdir(handle); sigdir = alpm_option_get_gpgdir(handle);
if (_alpm_access(handle, sigdir, "pubring.gpg", R_OK)
|| _alpm_access(handle, sigdir, "trustdb.gpg", R_OK)) {
handle->pm_errno = ALPM_ERR_NOT_A_FILE;
_alpm_log(handle, ALPM_LOG_DEBUG, "Signature verification will fail!\n");
}
/* calling gpgme_check_version() returns the current version and runs /* calling gpgme_check_version() returns the current version and runs
* some internal library setup code */ * some internal library setup code */
version = gpgme_check_version(NULL); version = gpgme_check_version(NULL);