Currently when removing package files, xbps-remove attempts to remove package
directories.
Where such a directory happens to be a mountpoint, remove(3) (through rmdir(2))
returns EBUSY.
This should be ignored in the same way as ENOTEMPTY.
This can be reproduced with e.g.
# mount -o bind /etc /etc
# xbps-install -y tslib >/dev/null
# xbps-remove -y tslib >/dev/null
---
bin/xbps-remove/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/xbps-remove/main.c b/bin/xbps-remove/main.c
index 838e610b..948ea8c5 100644
--- a/bin/xbps-remove/main.c
+++ b/bin/xbps-remove/main.c
@@ -108,8 +108,8 @@ state_cb_rm(const struct xbps_state_cb_data *xscd, void
*cbdata UNUSED)
case XBPS_STATE_REMOVE_FILE_FAIL:
case XBPS_STATE_REMOVE_FILE_HASH_FAIL:
case XBPS_STATE_REMOVE_FILE_OBSOLETE_FAIL:
- /* Ignore errors due to not empty directories */
- if (xscd->err == ENOTEMPTY)
+ /* Ignore errors due to not empty directories or mountpoints */
+ if (xscd->err == ENOTEMPTY || xscd->err == EBUSY)
return 0;
xbps_error_printf("%s\n", xscd->desc);
--
2.19.1
--
You received this message because you are subscribed to the Google Groups
"voidlinux" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/voidlinux/20181113165755.13786-1-ovf%40mm.st.
For more options, visit https://groups.google.com/d/optout.