summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-11-02 15:29:11 +0100
committerAllan McRae <allan@archlinux.org>2013-02-09 03:43:37 +0100
commit4ccf16dff589ce9f369d377bb5d3f490bd27c624 (patch)
treece5b68c2e5f3d1612ccea5e39bd5763a7aeb1d04 /lib/libalpm/sync.c
parent31b9b264c1df2fc9a4f5c846d5d1735b5fbd7050 (diff)
downloadpacman-4ccf16dff589ce9f369d377bb5d3f490bd27c624.tar.gz
pacman-4ccf16dff589ce9f369d377bb5d3f490bd27c624.tar.xz
Remove retry path from signature validation
Now that the keyring is checked for all needed keys before the validation, we can not reach a point of a missing key when doing validity checks for sync operations. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 82beb8a2..34237713 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1089,15 +1089,13 @@ static int check_validity(alpm_handle_t *handle,
EVENT(handle, ALPM_EVENT_INTEGRITY_DONE, NULL, NULL);
if(errors) {
- int tryagain = 0;
for(i = errors; i; i = i->next) {
struct validity *v = i->data;
if(v->error == ALPM_ERR_PKG_INVALID_SIG) {
- int retry = _alpm_process_siglist(handle, v->pkg->name, v->siglist,
+ _alpm_process_siglist(handle, v->pkg->name, v->siglist,
v->level & ALPM_SIG_PACKAGE_OPTIONAL,
v->level & ALPM_SIG_PACKAGE_MARGINAL_OK,
v->level & ALPM_SIG_PACKAGE_UNKNOWN_OK);
- tryagain += retry;
} else if(v->error == ALPM_ERR_PKG_INVALID_CHECKSUM) {
prompt_to_delete(handle, v->path, v->error);
}
@@ -1108,14 +1106,10 @@ static int check_validity(alpm_handle_t *handle,
}
alpm_list_free(errors);
- if(tryagain == 0) {
- if(!handle->pm_errno) {
- RET_ERR(handle, ALPM_ERR_PKG_INVALID, -1);
- }
- return -1;
+ if(!handle->pm_errno) {
+ RET_ERR(handle, ALPM_ERR_PKG_INVALID, -1);
}
- /* we were told at least once we can try again */
- return 1;
+ return -1;
}
return 0;