From 20a16f55b32da071d362c2fa3faf1f55285d13a9 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 7 Feb 2012 18:43:59 +0100 Subject: use _alpm_access in a few more places for increased debugging info pacman -U 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 Signed-off-by: Dan McGee --- lib/libalpm/be_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/be_sync.c') diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index c4673b1b..f1621996 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -86,7 +86,7 @@ static int sync_db_validate(alpm_db_t *db) } /* we can skip any validation if the database doesn't exist */ - if(access(dbpath, R_OK) != 0 && errno == ENOENT) { + if(_alpm_access(db->handle, NULL, dbpath, R_OK) != 0 && errno == ENOENT) { db->status &= ~DB_STATUS_EXISTS; db->status |= DB_STATUS_MISSING; _alpm_log(db->handle, ALPM_LOG_WARNING, -- cgit v1.2.3-24-g4f1b