summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/be_package.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-09 02:42:52 +0200
committerDan McGee <dan@archlinux.org>2011-08-09 02:42:52 +0200
commit9d09c9fdf7f6156e81c28045e36970158f26d2f1 (patch)
tree07ec2f636ed155f020d667db56039df6d263a5ec /lib/libalpm/be_package.c
parent1d16875db7461a05eee456b39e815893c7aefd96 (diff)
downloadpacman-9d09c9fdf7f6156e81c28045e36970158f26d2f1.tar.gz
pacman-9d09c9fdf7f6156e81c28045e36970158f26d2f1.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_package.c')
-rw-r--r--lib/libalpm/be_package.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index f80790cd..41b1eb2d 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -313,7 +313,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile,
_alpm_log(handle, ALPM_LOG_DEBUG, "checking md5sum for %s\n", pkgfile);
if(_alpm_test_md5sum(pkgfile, md5sum) != 0) {
alpm_pkg_free(newpkg);
- RET_ERR(handle, ALPM_ERR_PKG_INVALID, NULL);
+ RET_ERR(handle, ALPM_ERR_PKG_INVALID_CHECKSUM, NULL);
}
}