summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/db.c2
-rw-r--r--lib/libalpm/remove.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 451f40d6..148c32dc 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -183,7 +183,7 @@ pmdb_t *_alpm_db_register(const char *treename, alpm_cb_db_register callback)
/* make sure the database directory exists */
snprintf(path, PATH_MAX, "%s%s/%s", handle->root, handle->dbpath, treename);
if(stat(path, &buf) != 0 || !S_ISDIR(buf.st_mode)) {
- _alpm_log(PM_LOG_ERROR, _("database directory '%s' does not exist, try creating it"), path);
+ _alpm_log(PM_LOG_DEBUG, _("database directory '%s' does not exist, creating it"), path);
if(_alpm_makepath(path) != 0) {
RET_ERR(PM_ERR_SYSTEM, NULL);
}
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index fed86b0c..47e5cfe7 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -169,9 +169,9 @@ static int can_remove_file(pmtrans_t *trans, const char *path)
/* If we fail write permissions due to a read-only filesystem, abort.
* Assume all other possible failures are covered somewhere else */
if(access(file, W_OK) == -1) {
- if(access(file, F_OK) == 0) {
- /* only return failure if the file ACTUALLY exists and we don't have
- * permissions */
+ if(errno != EACCES && access(file, F_OK) == 0) {
+ /* only return failure if the file ACTUALLY exists and we can't write to
+ * it - ignore "chmod -w" simple permission failures */
_alpm_log(PM_LOG_ERROR, _("cannot remove file '%s': %s"),
file, strerror(errno));
return(0);