Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/handle.c
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-08-01 14:19:50 -0700
committerAllan McRae <allan@archlinux.org>2014-08-04 14:23:58 +1000
commit03b9bf08ac3b1e3f2c3b950ce995654af2c40503 (patch)
treeb29640b65be43edc0755bfb895140a5e7dbd0a6c /lib/libalpm/handle.c
parent7f1360b44089d69bae9a793741c0292fe91e32e4 (diff)
handle_unlock: log lock removal failure
Rather than have individual callers log failure, just do it directly in _alpm_handle_unlock. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r--lib/libalpm/handle.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index b218a689..234fc4d0 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -126,6 +126,10 @@ int _alpm_handle_unlock(alpm_handle_t *handle)
handle->lockfd = -1;
if(unlink(handle->lockfile) && errno != ENOENT) {
+ _alpm_log(handle, ALPM_LOG_WARNING,
+ _("could not remove lock file %s\n"), handle->lockfile);
+ alpm_logaction(handle, ALPM_CALLER_PREFIX,
+ "warning: could not remove lock file %s\n", handle->lockfile);
return -1;
}
return 0;