[pacman-dev] [PATCH] Retrieve default SigLevel value from backend after initial setting

Dan McGee dan at archlinux.org
Tue Aug 23 02:07:18 EDT 2011


This ensures we grab and use the library default once we have processed
the global SigLevel setting, but before processing the repo-specific
settings. This means the following two configs will now evaluate the
same, as the backend currently defaults to 'Optional':

Config 1:
    [options]
    # nothing here
    [repo]
    SigLevel = TrustAll

Config 2:
    [options]
    SigLevel = Optional
    [repo]
    SigLevel = TrustAll

Signed-off-by: Dan McGee <dan at archlinux.org>
---
 src/pacman/conf.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 29e835c..fe85849 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -563,6 +563,9 @@ static int setup_libalpm(void)
 	if(config->siglevel != ALPM_SIG_USE_DEFAULT) {
 		alpm_option_set_default_siglevel(handle, config->siglevel);
 	}
+	/* retrieve the set or default siglevel from the backend at this point;
+	 * this way all future DB settings base their setting off this value */
+	config->siglevel = alpm_option_get_default_siglevel(handle);
 
 	if(config->xfercommand) {
 		alpm_option_set_fetchcb(handle, download_with_xfercommand);
-- 
1.7.6



More information about the pacman-dev mailing list