Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2009-01-19 20:45:12 +0100
committerXavier Chantry <shiningxc@gmail.com>2009-01-20 14:04:54 +0100
commit14230869e6a37526f8a1bdb1fb88f23309b10aef (patch)
tree2edc0a14e297426af668acc54ae70f785911b98a /lib/libalpm/db.c
parenteab96848376db6f54f05773a7e924faf0355137f (diff)
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 <shiningxc@gmail.com>
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c15
1 files changed, 0 insertions, 15 deletions
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);
}