summaryrefslogtreecommitdiff
path: root/src/pacman
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2009-09-14 22:44:51 -0500
committerDan McGee <dan@archlinux.org>2009-09-20 12:19:57 -0500
commit72883e3bcbc1ff2d46667fceb48c3c2c682cfe79 (patch)
tree46b4882f5375dd426c938f30968263f9e6af5355 /src/pacman
parent6bfca2fd14d07a18d7000d1f9dd998428036656f (diff)
Fully implement database lazy loading
Commit 34e1413d75 attempted to implement lazy loading of package databases. Although it took care of my main complaint (creating the database directory if it didn't exist), it didn't allow sync repos to be registered before alpm_option_set_dbpath() had been called. With this patch, we no longer compute the individual repository DB paths until necessary, allowing full lazy loading to work as intended, and allowing us to drop the extra setlibpath() calls from the frontend. This allows the changes introduced in a2cd48960 (but later reverted) to be added back in again. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman')
-rw-r--r--src/pacman/pacman.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 2a228ed9..ac515029 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -758,11 +758,8 @@ static int _parseconfig(const char *file, const char *givensection,
ret = 1;
goto cleanup;
}
- /* if we are not looking at the options section, register a db and also
- * ensure we have set all of our library paths as the library is too stupid
- * at the moment to do lazy opening of the databases */
+ /* if we are not looking at the options section, register a db */
if(strcmp(section, "options") != 0) {
- setlibpaths();
db = alpm_db_register_sync(section);
if(db == NULL) {
pm_printf(PM_LOG_ERROR, _("could not register '%s' database (%s)\n"),