summaryrefslogtreecommitdiff
path: root/lib/libalpm/cache.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-01-31 06:48:06 +0000
committerAaron Griffin <aaron@archlinux.org>2007-01-31 06:48:06 +0000
commit0adceabe137fb4647f27916733124599b913a750 (patch)
tree9e248893a6b13e919bcba84b95708932931ec529 /lib/libalpm/cache.c
parent670319c2fb41f5ce5b446ad52bf2d8ddcf8c1548 (diff)
downloadpacman-0adceabe137fb4647f27916733124599b913a750.tar.xz
Fix corrupt DB entry handling when loading package entries.
* scan loops no longer abort on corrupt entries * reloading a cache package (and discovering it corrupt) no longer prints 2 messages and uses the pre-build "remove from package cache" function NOTE: The TODOs in there are important for later w.r.t. cleaning up corrupt DB entries but there are some logical complexities with doing so, so I'm holding off for now.
Diffstat (limited to 'lib/libalpm/cache.c')
-rw-r--r--lib/libalpm/cache.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c
index 41b23c36..e7c58a19 100644
--- a/lib/libalpm/cache.c
+++ b/lib/libalpm/cache.c
@@ -121,9 +121,8 @@ int _alpm_db_ensure_pkgcache(pmdb_t *db, pmdbinfrq_t infolevel)
pmpkg_t *pkg = (pmpkg_t *)p->data;
if(infolevel != INFRQ_NONE && !(pkg->infolevel & infolevel)) {
if(_alpm_db_read(db, infolevel, pkg) == -1) {
- _alpm_log(PM_LOG_ERROR, _("failed to read package '%s-%s', removing from package cache"),
- pkg->name, pkg->version);
- p = alpm_list_remove_node(p);
+ /* TODO should we actually remove from the filesystem here as well? */
+ _alpm_db_remove_pkgfromcache(db, pkg);
} else {
reloaded = 1;
}