FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 09-21-2011, 03:18 PM
Dan McGee
 
Default Move default siglevel value from backend to frontend

This takes the libraries hidden default out of the equation: hidden in
the sense that we can't even find out what it is until we create a
handle. This is a chicken-and-egg problem where we have probably already
parsed the config, so it is hard to get the bitmask value right.

Move it to the frontend so the caller can do whatever the heck they
want. This also exposes a shortcoming where the frontend doesn't know if
the library even supports signatures, so we should probably add a
alpm_capabilities() method which exposes things like HAS_DOWNLOADER,
HAS_SIGNATURES, etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
lib/libalpm/handle.c | 7 +------
src/pacman/conf.c | 3 ++-
2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index dcd81ce..7402be5 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -39,17 +39,12 @@
#include "trans.h"
#include "alpm.h"

-alpm_handle_t *_alpm_handle_new()
+alpm_handle_t *_alpm_handle_new(void)
{
alpm_handle_t *handle;

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;
}

diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index e8b34f7..7f4b006 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -54,7 +54,8 @@ config_t *config_new(void)
newconfig->op = PM_OP_MAIN;
newconfig->logmask = ALPM_LOG_ERROR | ALPM_LOG_WARNING;
newconfig->configfile = strdup(CONFFILE);
- newconfig->siglevel = ALPM_SIG_USE_DEFAULT;
+ newconfig->siglevel = ALPM_SIG_PACKAGE | ALPM_SIG_PACKAGE_OPTIONAL |
+ ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL;

return newconfig;
}
--
1.7.6.3
 

Thread Tools




All times are GMT. The time now is 12:58 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org