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 --- lib/libalpm/error.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libalpm/error.c') diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c index 7e0e5c85..b3f56819 100644 --- a/lib/libalpm/error.c +++ b/lib/libalpm/error.c @@ -108,6 +108,8 @@ const char SYMEXPORT *alpm_strerror(enum _alpm_errno_t err) case ALPM_ERR_PKG_IGNORED: return _("operation cancelled due to ignorepkg"); case ALPM_ERR_PKG_INVALID: + return _("invalid or corrupted package"); + case ALPM_ERR_PKG_INVALID_CHECKSUM: return _("invalid or corrupted package (checksum)"); case ALPM_ERR_PKG_INVALID_SIG: return _("invalid or corrupted package (PGP signature)"); -- cgit v1.2.3-70-g09d2