summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-27 09:15:36 -0500
committerDan McGee <dan@archlinux.org>2011-09-27 09:15:36 -0500
commitfa929e8258c8022f15dac79dc507fa0e53190656 (patch)
tree0cbbdb24b76c461b845bf0a74222be04e4c73d39 /lib
parentb242b2d0508a94cdc4c1a68e54ef90e941cbc6d7 (diff)
downloadpacman-fa929e8258c8022f15dac79dc507fa0e53190656.tar.xz
Fix compilation using --without-gpgme
I'm really good at breaking this on a regular basis. If only we had some sort of automated testing for this... Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/signing.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index b9b09e29..c30cda09 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -573,13 +573,18 @@ error:
}
return ret;
}
-#else
+
+#else /* HAVE_LIBGPGME */
+static int key_in_keychain(alpm_handle_t UNUSED *handle, const char UNUSED *fpr)
+{
+ return -1;
+}
int _alpm_gpgme_checksig(alpm_handle_t UNUSED *handle, const char UNUSED *path,
const char UNUSED *base64_sig, alpm_siglist_t UNUSED *siglist)
{
return -1;
}
-#endif
+#endif /* HAVE_LIBGPGME */
/**
* Form a signature path given a file path.
@@ -717,7 +722,6 @@ int _alpm_process_siglist(alpm_handle_t *handle, const char *identifier,
for(i = 0; i < siglist->count; i++) {
alpm_sigresult_t *result = siglist->results + i;
const char *name = result->key.uid ? result->key.uid : result->key.fingerprint;
- int answer;
switch(result->status) {
case ALPM_SIGSTATUS_VALID:
case ALPM_SIGSTATUS_KEY_EXPIRED:
@@ -755,7 +759,9 @@ int _alpm_process_siglist(alpm_handle_t *handle, const char *identifier,
}
_alpm_log(handle, ALPM_LOG_ERROR,
_("%s: key \"%s\" is unknown\n"), identifier, name);
+#ifdef HAVE_LIBGPGME
{
+ int answer;
alpm_pgpkey_t fetch_key;
memset(&fetch_key, 0, sizeof(fetch_key));
@@ -785,6 +791,7 @@ int _alpm_process_siglist(alpm_handle_t *handle, const char *identifier,
}
gpgme_key_unref(fetch_key.data);
}
+#endif
break;
case ALPM_SIGSTATUS_KEY_DISABLED:
_alpm_log(handle, ALPM_LOG_ERROR,