--- pacman-3.0.5.orig/lib/libalpm/remove.c Thu Apr 5 18:34:39 2007 +++ pacman-3.0.5/lib/libalpm/remove.c Sun Jul 22 19:05:00 2007 @@ -34,7 +34,7 @@ #if defined(__APPLE__) || defined(__OpenBSD__) #include #endif -#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__sun__) +#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__sun__) || defined(__FreeBSD__) #include #endif #include @@ -169,7 +169,7 @@ /* 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(errno != EACCES && access(file, F_OK) == 0) { + if(errno != EACCES && errno != ETXTBSY && 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"),