mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-11 20:05:07 -05:00
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>
This commit is contained in:
parent
6b8f404a33
commit
22c900e7d5
@ -386,6 +386,8 @@ alpm_list_t *alpm_deptest(pmdb_t *db, alpm_list_t *targets);
|
||||
const char *alpm_miss_get_target(const pmdepmissing_t *miss);
|
||||
pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss);
|
||||
|
||||
alpm_list_t *alpm_checkdbconflicts(pmdb_t *db_local);
|
||||
|
||||
const char *alpm_conflict_get_package1(pmconflict_t *conflict);
|
||||
const char *alpm_conflict_get_package2(pmconflict_t *conflict);
|
||||
|
||||
|
@ -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.
|
||||
|
@ -40,7 +40,6 @@ void _alpm_conflict_free(pmconflict_t *conflict);
|
||||
int _alpm_conflict_isin(pmconflict_t *needle, alpm_list_t *haystack);
|
||||
alpm_list_t *_alpm_innerconflicts(alpm_list_t *packages);
|
||||
alpm_list_t *_alpm_outerconflicts(pmdb_t *db, alpm_list_t *packages);
|
||||
alpm_list_t *_alpm_checkconflicts(pmdb_t *db, alpm_list_t *packages);
|
||||
alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans, char *root);
|
||||
|
||||
void _alpm_fileconflict_free(pmfileconflict_t *conflict);
|
||||
|
@ -456,7 +456,8 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
|
||||
EVENT(trans, PM_TRANS_EVT_INTERCONFLICTS_START, NULL, NULL);
|
||||
|
||||
_alpm_log(PM_LOG_DEBUG, "looking for conflicts\n");
|
||||
deps = _alpm_checkconflicts(db_local, list);
|
||||
deps = alpm_list_join(_alpm_innerconflicts(list),
|
||||
_alpm_outerconflicts(db_local, list));
|
||||
if(deps) {
|
||||
int errorout = 0;
|
||||
alpm_list_t *asked = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user