[pacman-dev] [PATCH 2/3] check_keyring: skip keys known to be missing

Andrew Gregory andrew.gregory.8 at gmail.com
Tue Sep 30 19:24:19 UTC 2014


Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---
 lib/libalpm/sync.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 27e720d..b6b225d 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1074,10 +1074,9 @@ static int check_keyring(alpm_handle_t *handle)
 					alpm_list_t *k;
 					for(k = keys; k; k = k->next) {
 						char *key = k->data;
-						if(_alpm_key_in_keychain(handle, key) == 0) {
-							if(!alpm_list_find_str(errors, key)) {
-								errors = alpm_list_add(errors, strdup(key));
-							}
+						if(!alpm_list_find_str(errors, key) &&
+								_alpm_key_in_keychain(handle, key) == 0) {
+							errors = alpm_list_add(errors, strdup(key));
 						}
 					}
 					FREELIST(keys);
-- 
2.1.1


More information about the pacman-dev mailing list