summaryrefslogtreecommitdiff
path: root/src/pacman/sync.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-08 19:42:52 -0500
committerDan McGee <dan@archlinux.org>2011-08-08 19:42:52 -0500
commit9d09c9fdf7f6156e81c28045e36970158f26d2f1 (patch)
tree07ec2f636ed155f020d667db56039df6d263a5ec /src/pacman/sync.c
parent1d16875db7461a05eee456b39e815893c7aefd96 (diff)
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 'src/pacman/sync.c')
-rw-r--r--src/pacman/sync.c4
1 files changed, 3 insertions, 1 deletions
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;