From 2aa7e69da91c1d7a18473cf05df98c92bd1dc747 Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Sun, 18 Nov 2007 14:25:43 +0100 Subject: Add the pmconflict_t type. pmdepmissing_t was used for two totally different things : missing dependencies, and dependency conflicts. So this patch simply adds a type for dep conflicts, and convert the code to use it. This fix the TODO in conflict.c : /* TODO WTF is a 'depmissing' doing indicating a conflict? */ Additionally, the code in conflict.c now eliminates the duplicated conflicts. If pkg1 conflicts with pkg2, and pkg2 conflicts with pkg1, only one of them will be stored. However the conflict handling in sync_prepare (sync.c) is still very asymetrical, and very ugly too. This should be improved in the future (there is already a pending patch from Nagy that cleans it a lot). Signed-off-by: Chantry Xavier --- lib/libalpm/add.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index fbdf4ea4..e6efe2d7 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -163,10 +163,10 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data) _alpm_log(PM_LOG_DEBUG, "looking for conflicts\n"); lp = _alpm_checkconflicts(db, trans->packages); for(i = lp; i; i = i->next) { - pmdepmissing_t *miss = i->data; + pmconflict_t *conflict = i->data; _alpm_log(PM_LOG_ERROR, _("replacing packages with -A and -U is not supported yet\n")); - _alpm_log(PM_LOG_ERROR, _("please remove '%s' first, using -Rd\n"), miss->depend.name); + _alpm_log(PM_LOG_ERROR, _("please remove '%s' first, using -Rd\n"), conflict->package2); RET_ERR(PM_ERR_CONFLICTING_DEPS, -1); /* Attempt to resolve conflicts */ -- cgit v1.2.3-70-g09d2