summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-16 18:33:20 +0200
committerDan McGee <dan@archlinux.org>2011-06-16 18:57:30 +0200
commit19fcc7401666cd892f7b8a5a49854a1b2eb9988b (patch)
treee39eb1b0f03ee527cdf75426e0c0df0824be32f0 /src
parentbdf00d3dbd19c3def6127f3d372d630930a26abb (diff)
downloadpacman-19fcc7401666cd892f7b8a5a49854a1b2eb9988b.tar.gz
pacman-19fcc7401666cd892f7b8a5a49854a1b2eb9988b.tar.xz
Make struct pmconflict_t public
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/sync.c12
-rw-r--r--src/pacman/upgrade.c13
-rw-r--r--src/util/testdb.c4
3 files changed, 14 insertions, 15 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 2c21d573..254117a7 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -795,14 +795,14 @@ static int sync_trans(alpm_list_t *targets)
case PM_ERR_CONFLICTING_DEPS:
for(i = data; i; i = alpm_list_next(i)) {
pmconflict_t *conflict = alpm_list_getdata(i);
- const char *package1 = alpm_conflict_get_package1(conflict);
- const char *package2 = alpm_conflict_get_package2(conflict);
- const char *reason = alpm_conflict_get_reason(conflict);
/* only print reason if it contains new information */
- if(strcmp(package1, reason) == 0 || strcmp(package2, reason) == 0) {
- printf(_(":: %s and %s are in conflict\n"), package1, package2);
+ if(strcmp(conflict->package1, conflict->reason) == 0 ||
+ strcmp(conflict->package2, conflict->reason) == 0) {
+ printf(_(":: %s and %s are in conflict\n"),
+ conflict->package1, conflict->package2);
} else {
- printf(_(":: %s and %s are in conflict (%s)\n"), package1, package2, reason);
+ printf(_(":: %s and %s are in conflict (%s)\n"),
+ conflict->package1, conflict->package2, conflict->reason);
}
}
break;
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index 37cf7007..0abcbe4e 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -121,14 +121,13 @@ int pacman_upgrade(alpm_list_t *targets)
case PM_ERR_CONFLICTING_DEPS:
for(i = data; i; i = alpm_list_next(i)) {
pmconflict_t *conflict = alpm_list_getdata(i);
- const char *package1 = alpm_conflict_get_package1(conflict);
- const char *package2 = alpm_conflict_get_package2(conflict);
- const char *reason = alpm_conflict_get_reason(conflict);
- /* only print reason if it contains new information */
- if(strcmp(package1, reason) == 0 || strcmp(package2, reason) == 0) {
- printf(_(":: %s and %s are in conflict\n"), package1, package2);
+ if(strcmp(conflict->package1, conflict->reason) == 0 ||
+ strcmp(conflict->package2, conflict->reason) == 0) {
+ printf(_(":: %s and %s are in conflict\n"),
+ conflict->package1, conflict->package2);
} else {
- printf(_(":: %s and %s are in conflict (%s)\n"), package1, package2, reason);
+ printf(_(":: %s and %s are in conflict (%s)\n"),
+ conflict->package1, conflict->package2, conflict->reason);
}
}
break;
diff --git a/src/util/testdb.c b/src/util/testdb.c
index 0bd78202..aeccdb7c 100644
--- a/src/util/testdb.c
+++ b/src/util/testdb.c
@@ -120,8 +120,8 @@ static int checkconflicts(alpm_list_t *pkglist)
data = alpm_checkconflicts(handle, pkglist);
for(i = data; i; i = i->next) {
pmconflict_t *conflict = alpm_list_getdata(i);
- printf("%s conflicts with %s\n", alpm_conflict_get_package1(conflict),
- alpm_conflict_get_package2(conflict));
+ printf("%s conflicts with %s\n",
+ conflict->package1, conflict->package2);
ret++;
}
FREELIST(data);