From 26f072210beca2ea566d13d363227f404e7e160c Mon Sep 17 00:00:00 2001 From: b-l-a-i-n-e Date: Sun, 12 Dec 2021 20:43:45 -0800 Subject: [PATCH] zap: `chmod -R` needed to remove Go modules We need to `chmod -R` to clean up after Go packages if they get moved into the masterdir. But since the removal of go packages is unnecessary in most cases, we only run if the first `rm -rf` fails. --- xbps-src | 1 + 1 file changed, 1 insertion(+) diff --git a/xbps-src b/xbps-src index ff249015ed0288..6ee069b54e1271 100755 --- a/xbps-src +++ b/xbps-src @@ -292,6 +292,7 @@ check_native_arch() { } masterdir_zap() { + rm -rf "$XBPS_MASTERDIR" || chmod -R +wX "$XBPS_MASTERDIR" # needed to remove go modules rm -rf "$XBPS_MASTERDIR" mkdir -p "$XBPS_MASTERDIR" msg_normal "xbps-src: $XBPS_MASTERDIR masterdir cleaned up.\n"