diff options
author | Nagy Gabor <ngaba@bibl.u-szeged.hu> | 2007-11-18 14:25:43 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-11-18 19:42:39 +0100 |
commit | 2aa7e69da91c1d7a18473cf05df98c92bd1dc747 (patch) | |
tree | 1bec8c7ecd1fa012522d2bc311ecefb0f45e1d3b /src | |
parent | 65fb99133df10143e07c237f04777e01b443c037 (diff) | |
download | pacman-2aa7e69da91c1d7a18473cf05df98c92bd1dc747.tar.gz pacman-2aa7e69da91c1d7a18473cf05df98c92bd1dc747.tar.xz |
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 <shiningxc@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/add.c | 5 | ||||
-rw-r--r-- | src/pacman/sync.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/pacman/add.c b/src/pacman/add.c index f685cc70..7d187495 100644 --- a/src/pacman/add.c +++ b/src/pacman/add.c @@ -147,10 +147,9 @@ int pacman_add(alpm_list_t *targets) break; case PM_ERR_CONFLICTING_DEPS: for(i = data; i; i = alpm_list_next(i)) { - pmdepmissing_t *miss = alpm_list_getdata(i); - pmdepend_t *dep = alpm_miss_get_dep(miss); + pmconflict_t *conflict = alpm_list_getdata(i); printf(_(":: %s: conflicts with %s"), - alpm_miss_get_target(miss), alpm_dep_get_name(dep)); + alpm_conflict_get_package1(conflict), alpm_conflict_get_package2(conflict)); } break; case PM_ERR_FILE_CONFLICTS: diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 2d30e641..41d18a9a 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -620,10 +620,9 @@ int sync_trans(alpm_list_t *targets, int sync_only) break; case PM_ERR_CONFLICTING_DEPS: for(i = data; i; i = alpm_list_next(i)) { - pmdepmissing_t *miss = alpm_list_getdata(i); - pmdepend_t *dep = alpm_miss_get_dep(miss); + pmconflict_t *conflict = alpm_list_getdata(i); printf(_(":: %s: conflicts with %s"), - alpm_miss_get_target(miss), alpm_dep_get_name(dep)); + alpm_conflict_get_package1(conflict), alpm_conflict_get_package2(conflict)); } break; default: |