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 /lib/libalpm/alpm.h | |
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 'lib/libalpm/alpm.h')
-rw-r--r-- | lib/libalpm/alpm.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index a28c912a..658eca70 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -52,6 +52,7 @@ typedef struct __pmtrans_t pmtrans_t; typedef struct __pmsyncpkg_t pmsyncpkg_t; typedef struct __pmdepend_t pmdepend_t; typedef struct __pmdepmissing_t pmdepmissing_t; +typedef struct __pmconflict_t pmconflict_t; typedef struct __pmfileconflict_t pmfileconflict_t; typedef struct __pmgraph_t pmgraph_t; @@ -367,20 +368,17 @@ typedef enum _pmdepmod_t { PM_DEP_MOD_LE } pmdepmod_t; -typedef enum _pmdeptype_t { - PM_DEP_TYPE_DEPEND = 1, - PM_DEP_TYPE_CONFLICT -} pmdeptype_t; - pmdepend_t *alpm_splitdep(const char *depstring); int alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep); alpm_list_t *alpm_checkdeps(pmdb_t *db, pmtranstype_t op, alpm_list_t *packages); const char *alpm_miss_get_target(const pmdepmissing_t *miss); -pmdeptype_t alpm_miss_get_type(const pmdepmissing_t *miss); pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss); +const char *alpm_conflict_get_package1(pmconflict_t *conflict); +const char *alpm_conflict_get_package2(pmconflict_t *conflict); + pmdepmod_t alpm_dep_get_mod(const pmdepend_t *dep); const char *alpm_dep_get_name(const pmdepend_t *dep); const char *alpm_dep_get_version(const pmdepend_t *dep); |