From 777bdc6c508a1a94dfa0854a34c7964ba0af02c9 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 27 Oct 2010 01:41:01 -0500 Subject: 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 --- lib/libalpm/be_local.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/be_local.c') 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); -- cgit v1.2.3