summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-02-07 18:43:59 +0100
committerDan McGee <dan@archlinux.org>2012-02-13 17:02:02 +0100
commit20a16f55b32da071d362c2fa3faf1f55285d13a9 (patch)
tree00bb4cf9fcf0846d2a77a79d1317c66fecee19d1 /lib/libalpm/util.c
parentf55be4897799c5a6dcb454455ad9edcfc36f8495 (diff)
downloadpacman-20a16f55b32da071d362c2fa3faf1f55285d13a9.tar.gz
pacman-20a16f55b32da071d362c2fa3faf1f55285d13a9.tar.xz
use _alpm_access in a few more places for increased debugging info
pacman -U <pkg> returns a bogus "could not find or read package" if the file is on a fuse file system that doesn't allow root access. Debug output isn't very helpful here either so we should log why the access check failed. The other 2 checks already log something when failing so logging a more specific error won't hurt either. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 24bf1fc0..11285896 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -686,7 +686,7 @@ const char *_alpm_filecache_setup(alpm_handle_t *handle)
} else if(!S_ISDIR(buf.st_mode)) {
_alpm_log(handle, ALPM_LOG_DEBUG,
"skipping cachedir, not a directory: %s\n", cachedir);
- } else if(access(cachedir, W_OK) != 0) {
+ } else if(_alpm_access(handle, NULL, cachedir, W_OK) != 0) {
_alpm_log(handle, ALPM_LOG_DEBUG,
"skipping cachedir, not writable: %s\n", cachedir);
} else if(!(buf.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH))) {