summaryrefslogtreecommitdiff
path: root/src/pacman
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-16 11:27:44 -0500
committerDan McGee <dan@archlinux.org>2011-06-16 11:57:06 -0500
commitbdf00d3dbd19c3def6127f3d372d630930a26abb (patch)
treea6265c2db858d1981c2f8ddc7a394ee3416279e8 /src/pacman
parent1cd6515af0ae5d1c3dabd30749a37cfefa7dc4f5 (diff)
Make pmfileconflict_t type public
This removes the need to write accessor methods for every type we have, and simplifies the API. Any type that doesn't need magic* can be converted in this fashion to make it easier for frontend applications to use, as well as make it less of a pain to introduce new such structs in the future. * "magic" meaning something like pmpkg_t where values can be lazy loaded. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman')
-rw-r--r--src/pacman/sync.c9
-rw-r--r--src/pacman/upgrade.c9
2 files changed, 6 insertions, 12 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 37b9d6e3..2c21d573 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -849,17 +849,14 @@ static int sync_trans(alpm_list_t *targets)
case PM_ERR_FILE_CONFLICTS:
for(i = data; i; i = alpm_list_next(i)) {
pmfileconflict_t *conflict = alpm_list_getdata(i);
- switch(alpm_fileconflict_get_type(conflict)) {
+ switch(conflict->type) {
case PM_FILECONFLICT_TARGET:
printf(_("%s exists in both '%s' and '%s'\n"),
- alpm_fileconflict_get_file(conflict),
- alpm_fileconflict_get_target(conflict),
- alpm_fileconflict_get_ctarget(conflict));
+ conflict->file, conflict->target, conflict->ctarget);
break;
case PM_FILECONFLICT_FILESYSTEM:
printf(_("%s: %s exists in filesystem\n"),
- alpm_fileconflict_get_target(conflict),
- alpm_fileconflict_get_file(conflict));
+ conflict->target, conflict->file);
break;
}
}
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index c0466456..37cf7007 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -173,17 +173,14 @@ int pacman_upgrade(alpm_list_t *targets)
case PM_ERR_FILE_CONFLICTS:
for(i = data; i; i = alpm_list_next(i)) {
pmfileconflict_t *conflict = alpm_list_getdata(i);
- switch(alpm_fileconflict_get_type(conflict)) {
+ switch(conflict->type) {
case PM_FILECONFLICT_TARGET:
printf(_("%s exists in both '%s' and '%s'\n"),
- alpm_fileconflict_get_file(conflict),
- alpm_fileconflict_get_target(conflict),
- alpm_fileconflict_get_ctarget(conflict));
+ conflict->file, conflict->target, conflict->ctarget);
break;
case PM_FILECONFLICT_FILESYSTEM:
printf(_("%s: %s exists in filesystem\n"),
- alpm_fileconflict_get_target(conflict),
- alpm_fileconflict_get_file(conflict));
+ conflict->target, conflict->file);
break;
}
}