summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2015-01-22 06:29:53 +0100
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-05-11 06:45:30 +0200
commit2e63d6aa7fcdfd89f02758f02f5799a291405b40 (patch)
tree03a2661f903afdbc6539b6530bf90aece2b4e55a /lib/libalpm/add.c
parent4143760a944470d50975ee27da9e3380223e88b9 (diff)
downloadpacman-2e63d6aa7fcdfd89f02758f02f5799a291405b40.tar.gz
pacman-2e63d6aa7fcdfd89f02758f02f5799a291405b40.tar.xz
make pm_errno thread-local
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 0beed01c..fa33c7b6 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -478,7 +478,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
if(oldpkg) {
/* set up fake remove transaction */
if(_alpm_remove_single_package(handle, oldpkg, newpkg, 0, 0) == -1) {
- handle->pm_errno = ALPM_ERR_TRANS_ABORT;
+ _alpm_set_errno(handle, ALPM_ERR_TRANS_ABORT);
ret = -1;
goto cleanup;
}
@@ -490,7 +490,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
alpm_logaction(handle, ALPM_CALLER_PREFIX,
"error: could not create database entry %s-%s\n",
newpkg->name, newpkg->version);
- handle->pm_errno = ALPM_ERR_DB_WRITE;
+ _alpm_set_errno(handle, ALPM_ERR_DB_WRITE);
ret = -1;
goto cleanup;
}
@@ -601,7 +601,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
alpm_logaction(handle, ALPM_CALLER_PREFIX,
"error: could not update database entry %s-%s\n",
newpkg->name, newpkg->version);
- handle->pm_errno = ALPM_ERR_DB_WRITE;
+ _alpm_set_errno(handle, ALPM_ERR_DB_WRITE);
ret = -1;
goto cleanup;
}
@@ -678,7 +678,7 @@ int _alpm_upgrade_packages(alpm_handle_t *handle)
if(commit_single_pkg(handle, newpkg, pkg_current, pkg_count)) {
/* something screwed up on the commit, abort the trans */
trans->state = STATE_INTERRUPTED;
- handle->pm_errno = ALPM_ERR_TRANS_ABORT;
+ _alpm_set_errno(handle, ALPM_ERR_TRANS_ABORT);
/* running ldconfig at this point could possibly screw system */
skip_ldconfig = 1;
ret = -1;