Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-02-01 21:18:31 +1000
committerAllan McRae <allan@archlinux.org>2015-02-01 21:18:31 +1000
commit54c630f6ecd74a44cc84f6804e918bda61310eef (patch)
tree974465cc870e9ce2a7e3ad61e14b2c5c66e6d34b /lib
parent5167160c0cd6007c0ed77534f02f78e5ad04e719 (diff)
parent10fc538c70bf84f64881403f964ff4d6651268b3 (diff)
Merge branch 'maint'
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/trans.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index e680feb3..48745d3b 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -192,13 +192,17 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
if(trans->add == NULL) {
if(_alpm_remove_packages(handle, 1) == -1) {
/* pm_errno is set by _alpm_remove_packages() */
+ alpm_errno_t save = handle->pm_errno;
alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction failed\n");
+ handle->pm_errno = save;
return -1;
}
} else {
if(_alpm_sync_commit(handle, data) == -1) {
/* pm_errno is set by _alpm_sync_commit() */
+ alpm_errno_t save = handle->pm_errno;
alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction failed\n");
+ handle->pm_errno = save;
return -1;
}
}