From 9d09c9fdf7f6156e81c28045e36970158f26d2f1 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 8 Aug 2011 19:42:52 -0500 Subject: Attempt to fix up some of the brokenness around failed package loads This is a bit of a mess, due to the fact that we have a progress meter running. It is also ironic that we are in the midst of a method named "commit" when we haven't done a damn thing yet, and can still fail hard if either a checksum or signature is invalid or unrecognized. Adapt the former test_md5sum method to be invoked for any of the various failure types, which at least gives the user some indication of what packages are failing. A second patch will be needed to actually show worthwhile error codes, but this is going to involve modifying the actual data passed with the callback. Signed-off-by: Dan McGee --- src/pacman/sync.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 3846b303..f4f8fc43 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -844,9 +844,11 @@ int sync_prepare_execute(void) } break; case ALPM_ERR_PKG_INVALID: + case ALPM_ERR_PKG_INVALID_CHECKSUM: + case ALPM_ERR_PKG_INVALID_SIG: case ALPM_ERR_DLT_INVALID: for(i = data; i; i = alpm_list_next(i)) { - char *filename = alpm_list_getdata(i); + const char *filename = alpm_list_getdata(i); printf(_("%s is invalid or corrupted\n"), filename); } break; -- cgit v1.2.3