Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/handle.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-18 20:30:28 -0500
committerDan McGee <dan@archlinux.org>2011-07-18 21:06:24 -0500
commit05f7c0280e31d25e0b9b5c5cca349eb93e24f04f (patch)
treeaa23c8a2d774c1ec1a68b2ea94d1c4849336de4f /lib/libalpm/handle.c
parentf1d25ba2dd2640054b8e2e1c7c39669abb0cc6e8 (diff)
Fix test suite when GPGME is disabled
As noted by Allan, we failed pretty hard if gpgme was compiled out. With these changes, only sign001.py fails. This can/will be fixed later once we beef up the test suite with more signing tests anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r--lib/libalpm/handle.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 9bffd4fd..266b4bc8 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -45,8 +45,10 @@ alpm_handle_t *_alpm_handle_new()
CALLOC(handle, 1, sizeof(alpm_handle_t), return NULL);
+#ifdef HAVE_LIBGPGME
handle->siglevel = ALPM_SIG_PACKAGE | ALPM_SIG_PACKAGE_OPTIONAL |
ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL;
+#endif
return handle;
}
@@ -579,7 +581,13 @@ int SYMEXPORT alpm_option_set_default_siglevel(alpm_handle_t *handle,
alpm_siglevel_t level)
{
CHECK_HANDLE(handle, return -1);
+#ifdef HAVE_LIBGPGME
handle->siglevel = level;
+#else
+ if(level != 0 && level != ALPM_SIG_USE_DEFAULT) {
+ RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1);
+ }
+#endif
return 0;
}