From 2116ce78fb2e28c15f6f97e98ab88967b8a2dcec Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 5 Dec 2006 07:00:22 +0000 Subject: Corrected -Rsc operation - dependancy info was not being read from the DB --- lib/libalpm/deps.c | 3 +++ lib/libalpm/handle.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 7b32b7d0..43aa6407 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -465,6 +465,9 @@ pmlist_t *_alpm_removedeps(pmdb_t *db, pmlist_t *targs) } FREELISTPTR(k); } + + _alpm_db_read(db, INFRQ_DEPENDS, dep); + if(_alpm_pkg_isin(dep->name, targs)) { continue; } diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index ddc8d77d..4e0ffbec 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -152,14 +152,14 @@ void alpm_option_set_root(const char *root) void alpm_option_set_dbpath(const char *dbpath) { - if(handle->dbpath) FREE(handle->dbpath); - if(dbpath) handle->dbpath = strdup(dbpath); + if(handle->dbpath) FREE(handle->dbpath); + if(dbpath) handle->dbpath = strdup(dbpath); } void alpm_option_set_cachedir(const char *cachedir) { - if(handle->cachedir) FREE(handle->cachedir); - if(cachedir) handle->cachedir = strdup(cachedir); + if(handle->cachedir) FREE(handle->cachedir); + if(cachedir) handle->cachedir = strdup(cachedir); } void alpm_option_set_logfile(const char *logfile) -- cgit v1.2.3-24-g4f1b