summaryrefslogtreecommitdiffstats
path: root/src/pacman/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/sync.c')
-rw-r--r--src/pacman/sync.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 7a76dea0..74733e06 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -756,8 +756,19 @@ int pacman_sync(list_t *targets)
}
/* Step 3: actually perform the installation */
- if(alpm_trans_commit() == -1) {
+ if(alpm_trans_commit(&data) == -1) {
ERR(NL, "failed to commit transaction (%s)\n", alpm_strerror(pm_errno));
+ switch(pm_errno) {
+ case PM_ERR_FILE_CONFLICTS:
+ for(lp = alpm_list_first(data); lp; lp = alpm_list_next(lp)) {
+ MSG(NL, ":: %s\n", (char *)alpm_list_getdata(lp));
+ }
+ alpm_list_free(data);
+ MSG(NL, "\nerrors occurred, no packages were upgraded.\n");
+ break;
+ default:
+ break;
+ }
retval = 1;
goto cleanup;
}