index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaron@archlinux.org> | 2007-01-24 08:51:50 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-01-24 08:51:50 +0000 |
commit | 170d63190a3cfb0c12ee9ddfe07b21f20825bd6f (patch) | |
tree | c1cad21e75daf695f61f83ca1072d0a52343a673 /lib/libalpm/cache.c | |
parent | 1b61cc8c69025ddd394401a506b21f16df5d4e6d (diff) |
-rw-r--r-- | lib/libalpm/cache.c | 9 |
diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c index d03cf203..81737d3c 100644 --- a/lib/libalpm/cache.c +++ b/lib/libalpm/cache.c @@ -112,8 +112,13 @@ int _alpm_db_ensure_pkgcache(pmdb_t *db, pmdbinfrq_t infolevel) for(p = db->pkgcache; p; p = p->next) { pmpkg_t *pkg = (pmpkg_t *)p->data; if(infolevel != INFRQ_NONE && !(pkg->infolevel & infolevel)) { - _alpm_db_read(db, infolevel, pkg); - reloaded = 1; + 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); + } else { + reloaded = 1; + } } } if(reloaded) { |