Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-10-28 09:58:28 -0400
committerAllan McRae <allan@archlinux.org>2013-11-08 09:28:05 +1000
commitaf284d5fdb0ef15dbb7a2082380e2ec586599774 (patch)
treec1212e5acaef78afa98669a65f48653eb748d00d /lib/libalpm
parent88df07717de868dc2bd2424afefaea6c77efa4c0 (diff)
support ALPM_SIG_USE_DEFAULT for file siglevels
This brings file siglevels in line with how db siglevels are handled. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/handle.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 53c86c57..ea033b20 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -650,7 +650,11 @@ int SYMEXPORT alpm_option_set_local_file_siglevel(alpm_handle_t *handle,
alpm_siglevel_t SYMEXPORT alpm_option_get_local_file_siglevel(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return -1);
- return handle->localfilesiglevel;
+ if(handle->localfilesiglevel & ALPM_SIG_USE_DEFAULT) {
+ return handle->siglevel;
+ } else {
+ return handle->localfilesiglevel;
+ }
}
int SYMEXPORT alpm_option_set_remote_file_siglevel(alpm_handle_t *handle,
@@ -670,7 +674,11 @@ int SYMEXPORT alpm_option_set_remote_file_siglevel(alpm_handle_t *handle,
alpm_siglevel_t SYMEXPORT alpm_option_get_remote_file_siglevel(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return -1);
- return handle->remotefilesiglevel;
+ if(handle->remotefilesiglevel & ALPM_SIG_USE_DEFAULT) {
+ return handle->siglevel;
+ } else {
+ return handle->remotefilesiglevel;
+ }
}
/* vim: set ts=2 sw=2 noet: */