From 22c900e7d57bfa7c9ed482f888ef200c0289ceec Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sun, 9 Dec 2007 14:49:34 +0100 Subject: Add new public alpm_checkdbconflicts function. This function has a limited purpose, but might be interesting to do a sanity check from a frontend (eg testdb). Also removed the private _alpm_checkconflicts function to avoid confusion. This function was used only once in libalpm, in sync.c, and was just a single line anyway. Having to do it manually makes it explicit that we are looking for two kind of conflicts (targ vs targ and db vs targ). Signed-off-by: Chantry Xavier Signed-off-by: Dan McGee --- lib/libalpm/conflict.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/conflict.c') diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 37ced287..7b4cd0c2 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -207,9 +207,13 @@ alpm_list_t *_alpm_outerconflicts(pmdb_t *db, alpm_list_t *packages) return(baddeps); } -/* Check for transaction conflicts */ -alpm_list_t *_alpm_checkconflicts(pmdb_t *db, alpm_list_t *packages) { - return(alpm_list_join(_alpm_innerconflicts(packages), _alpm_outerconflicts(db, packages))); +/** Check the package conflicts in a database + * + * @param db_local the database to check + * @return an alpm_list_t of pmconflict_t + */ +alpm_list_t SYMEXPORT *alpm_checkdbconflicts(pmdb_t *db_local) { + return(_alpm_innerconflicts(_alpm_db_get_pkgcache(db_local))); } /* Returns a alpm_list_t* of file conflicts. -- cgit v1.2.3-54-g00ecf