[pacman-dev] [PATCH 2/3] always allow explicit empty siglevel for sync dbs

Andrew Gregory andrew.gregory.8 at gmail.com
Sat Nov 24 23:56:12 UTC 2018


An empty siglevel does not do any signature verification which is
exactly what we want when compiled without gpg support.  This is already
allowed in other parts of the codebase and required for the test suite
to pass when compiled without gpg support.

Fixes: FS#60880

Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---

Signature-related tests still fail without gpg support for obvious
reasons, but the rest should pass after this.

 lib/libalpm/be_sync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 6adf1cd9..4a4be548 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -787,7 +787,7 @@ alpm_db_t *_alpm_db_register_sync(alpm_handle_t *handle, const char *treename,
 	_alpm_log(handle, ALPM_LOG_DEBUG, "registering sync database '%s'\n", treename);
 
 #ifndef HAVE_LIBGPGME
-	if(level != ALPM_SIG_USE_DEFAULT) {
+	if(level != 0 && level != ALPM_SIG_USE_DEFAULT) {
 		RET_ERR(handle, ALPM_ERR_MISSING_CAPABILITY_SIGNATURES, NULL);
 	}
 #endif
-- 
2.19.1


More information about the pacman-dev mailing list