diff options
author | morganamilo <morganamilo@gmail.com> | 2019-10-15 11:30:02 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-10-15 11:56:40 +0200 |
commit | 719efe19c7372ee7acc243d3d16180163f0bc132 (patch) | |
tree | 9111edd749d8128bf1ec94cff2fb43375c873a9d | |
parent | 54b6d689e5aaa56058e0c95223319221fa735821 (diff) | |
download | pacman-719efe19c7372ee7acc243d3d16180163f0bc132.tar.gz pacman-719efe19c7372ee7acc243d3d16180163f0bc132.tar.xz |
libalpm: set errno in signing dummy functions
This allows pacman to print the correct error message when checking keys
and libalpm has been compiled without gpgme support.
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | lib/libalpm/signing.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c index fc537dd3..7fed862e 100644 --- a/lib/libalpm/signing.c +++ b/lib/libalpm/signing.c @@ -788,21 +788,24 @@ error: } #else /* HAVE_LIBGPGME */ -int _alpm_key_in_keychain(alpm_handle_t UNUSED *handle, const char UNUSED *fpr) +int _alpm_key_in_keychain(alpm_handle_t *handle, const char UNUSED *fpr) { + handle->pm_errno = ALPM_ERR_MISSING_CAPABILITY_SIGNATURES; return -1; } -int _alpm_key_import(alpm_handle_t UNUSED *handle, const char UNUSED *uid, +int _alpm_key_import(alpm_handle_t *handle, const char UNUSED *uid, const char UNUSED *fpr) { + handle->pm_errno = ALPM_ERR_MISSING_CAPABILITY_SIGNATURES; return -1; } -int _alpm_gpgme_checksig(alpm_handle_t UNUSED *handle, const char UNUSED *path, +int _alpm_gpgme_checksig(alpm_handle_t *handle, const char UNUSED *path, const char UNUSED *base64_sig, alpm_siglist_t *siglist) { siglist->count = 0; + handle->pm_errno = ALPM_ERR_MISSING_CAPABILITY_SIGNATURES; return -1; } #endif /* HAVE_LIBGPGME */ |