From 3ad6b7a523fd07e41933189d33d3e78d38fbd9d3 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Wed, 1 Nov 2017 00:35:44 +0100 Subject: [PATCH] bin/xbps-remove: ignore EBUSY errors EBUSY occurs if xbps tries to remove a directory with unlink(2) that is a mount point, this happens with `/boot` as example. https: //github.com/voidlinux/void-packages/issues/7229#issuecomment-319392560 https: //github.com/voidlinux/void-packages/issues/8753 Closes: #259 [via git-merge-pr] --- 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..61057029 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 directories being a mount point */ + if (xscd->err == ENOTEMPTY || xscd->err == EBUSY) return 0; xbps_error_printf("%s\n", xscd->desc);