From 72883e3bcbc1ff2d46667fceb48c3c2c682cfe79 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 14 Sep 2009 22:44:51 -0500 Subject: 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 --- lib/libalpm/remove.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/remove.c') diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 7bafaf1c..f31fbfb0 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -386,8 +386,8 @@ int _alpm_remove_packages(pmtrans_t *trans, pmdb_t *db) /* get the name now so we can use it after package is removed */ pkgname = alpm_pkg_get_name(info); - snprintf(scriptlet, PATH_MAX, "%s%s-%s/install", db->path, - pkgname, alpm_pkg_get_version(info)); + snprintf(scriptlet, PATH_MAX, "%s%s-%s/install", + _alpm_db_path(db), pkgname, alpm_pkg_get_version(info)); EVENT(trans, PM_TRANS_EVT_REMOVE_START, info, NULL); _alpm_log(PM_LOG_DEBUG, "removing package %s-%s\n", -- cgit v1.2.3-24-g4f1b