summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/add.c2
-rw-r--r--src/pacman/pacman.c2
-rw-r--r--src/pacman/remove.c2
-rw-r--r--src/pacman/sync.c13
4 files changed, 15 insertions, 4 deletions
diff --git a/src/pacman/add.c b/src/pacman/add.c
index fb6c4a58..10c618eb 100644
--- a/src/pacman/add.c
+++ b/src/pacman/add.c
@@ -122,7 +122,7 @@ int pacman_add(list_t *targets)
/* Step 3: actually perform the installation
*/
- if(alpm_trans_commit() == -1) {
+ if(alpm_trans_commit(NULL) == -1) {
ERR(NL, "failed to commit transaction (%s)\n", alpm_strerror(pm_errno));
return(1);
}
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 646f7e9e..e1dff655 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
return(1);
}
config->op = PM_OP_MAIN;
- config->debug |= PM_LOG_WARNING | PM_LOG_ERROR;
+ config->debug |= PM_LOG_WARNING;
/* parse the command line */
ret = parseargs(argc, argv);
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 6dc3758c..b730dd9b 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -126,7 +126,7 @@ int pacman_remove(list_t *targets)
/* Step 3: actually perform the removal
*/
- if(alpm_trans_commit() == -1) {
+ if(alpm_trans_commit(NULL) == -1) {
ERR(NL, "failed to commit transaction (%s)\n", alpm_strerror(pm_errno));
goto error;
}
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;
}