From 14230869e6a37526f8a1bdb1fb88f23309b10aef Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Mon, 19 Jan 2009 20:45:12 +0100 Subject: Remove some db abstraction crap. These db_open and db_close looked quite useless. And they caused the db directory to be opened on a simple registering of a database. This is totally unneeded, this opening can be delayed to when we actually need it. Signed-off-by: Xavier Chantry --- lib/libalpm/db.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'lib/libalpm/db.c') diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index 9b91ce47..a639b1fb 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -85,9 +85,6 @@ static void _alpm_db_unregister(pmdb_t *db) return; } - _alpm_log(PM_LOG_DEBUG, "closing database '%s'\n", db->treename); - _alpm_db_close(db); - _alpm_log(PM_LOG_DEBUG, "unregistering database '%s'\n", db->treename); _alpm_db_free(db); } @@ -466,12 +463,6 @@ pmdb_t *_alpm_db_register_local(void) RET_ERR(PM_ERR_DB_CREATE, NULL); } - _alpm_log(PM_LOG_DEBUG, "opening database '%s'\n", db->treename); - if(_alpm_db_open(db) == -1) { - _alpm_db_free(db); - RET_ERR(PM_ERR_DB_OPEN, NULL); - } - handle->db_local = db; return(db); } @@ -522,12 +513,6 @@ pmdb_t *_alpm_db_register_sync(const char *treename) RET_ERR(PM_ERR_DB_CREATE, NULL); } - _alpm_log(PM_LOG_DEBUG, "opening database '%s'\n", db->treename); - if(_alpm_db_open(db) == -1) { - _alpm_db_free(db); - RET_ERR(PM_ERR_DB_OPEN, NULL); - } - handle->dbs_sync = alpm_list_add(handle->dbs_sync, db); return(db); } -- cgit v1.2.3-24-g4f1b