summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/be_local.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-10-27 01:41:01 -0500
committerDan McGee <dan@archlinux.org>2011-06-24 14:04:39 -0500
commit777bdc6c508a1a94dfa0854a34c7964ba0af02c9 (patch)
tree9c03e4239d0cd0d9e3c2f21385113d1ba96dec9a /lib/libalpm/be_local.c
parent719e0d3ddb300a8f0f8367b516c0e3c9579c4448 (diff)
downloadpacman-777bdc6c508a1a94dfa0854a34c7964ba0af02c9.tar.xz
Make sync DB reading a bit more flexible
We can reorganize things a bit to not require reading a directory-only entry first (or at all). This was noticed while working on some pactest improvements, but should be a good step forward anyway. Also make _alpm_splitname() a bit more generic in where it stores the data it parses. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_local.c')
-rw-r--r--lib/libalpm/be_local.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 96f04c51..50066883 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -439,7 +439,8 @@ static int local_db_populate(pmdb_t *db)
RET_ERR(db->handle, PM_ERR_MEMORY, -1);
}
/* split the db entry name */
- if(_alpm_splitname(name, pkg) != 0) {
+ if(_alpm_splitname(name, &(pkg->name), &(pkg->version),
+ &(pkg->name_hash)) != 0) {
_alpm_log(db->handle, PM_LOG_ERROR, _("invalid name for database entry '%s'\n"),
name);
_alpm_pkg_free(pkg);