summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/be_package.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-20 23:52:18 +0200
committerDan McGee <dan@archlinux.org>2011-09-22 17:35:52 +0200
commit4849a4596d502376f66c327a48c5d78328acdfe0 (patch)
tree19d28e713c881d47a4b6519cd170265fdc4f3f92 /lib/libalpm/be_package.c
parent0a4a5cea97f75d5d38e9cb33d5f47f0c36c0dffb (diff)
downloadpacman-4849a4596d502376f66c327a48c5d78328acdfe0.tar.gz
pacman-4849a4596d502376f66c327a48c5d78328acdfe0.tar.xz
Add _alpm_process_siglist() logic to failed package validation
This moves the result processing out of the validation check loop itself and into a new loop. Errors will be presented to the user one-by-one after we fully complete the validation loop, so they no longer overlap the progress bar. Unlike the database validation, we may have several errors to process in sequence here, so we use a function-scoped struct to track all the necessary information between seeing an error and asking the user about it. The older prompt_to_delete() callback logic is still kept, but only for checksum failures. It is debatable whether we should do this at all or just delegate said actions to the user. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_package.c')
-rw-r--r--lib/libalpm/be_package.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index a0534b00..c20c703f 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -287,6 +287,7 @@ int _alpm_pkg_validate_internal(alpm_handle_t *handle,
alpm_siglist_t **sigdata)
{
int has_sig;
+ handle->pm_errno = 0;
if(pkgfile == NULL || strlen(pkgfile) == 0) {
RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1);