diff options
author | Chantry Xavier <shiningxc@gmail.com> | 2007-12-09 14:49:34 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-01-24 03:12:41 +0100 |
commit | 22c900e7d57bfa7c9ed482f888ef200c0289ceec (patch) | |
tree | dd797c831d8edfb2679b176ba431099039b8f3e9 /lib/libalpm/conflict.c | |
parent | 6b8f404a33b14ccb89f3adedf438f08b330a177a (diff) | |
download | pacman-22c900e7d57bfa7c9ed482f888ef200c0289ceec.tar.gz pacman-22c900e7d57bfa7c9ed482f888ef200c0289ceec.tar.xz |
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 <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/conflict.c')
-rw-r--r-- | lib/libalpm/conflict.c | 10 |
1 files changed, 7 insertions, 3 deletions
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. |