From 6257721b22f9067b5e7cf995e65b4af377a5f79e Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Thu, 4 Jul 2019 14:09:44 +0300 Subject: [PATCH] build-package.sh: fix rm problems when builddir/srcdir contains RO files --- scripts/build/termux_step_start_build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/build/termux_step_start_build.sh b/scripts/build/termux_step_start_build.sh index c5eb2e32c..14b500c60 100644 --- a/scripts/build/termux_step_start_build.sh +++ b/scripts/build/termux_step_start_build.sh @@ -93,6 +93,10 @@ termux_step_start_build() { done<<<$(./scripts/buildorder.py "$TERMUX_PKG_BUILDER_DIR" $TERMUX_PACKAGES_DIRECTORIES || echo "ERROR") fi + # Following directories may contain objects with RO-only permissions which + # makes them undeletable. We need fix that. + chmod +w -R "$TERMUX_PKG_BUILDDIR" "$TERMUX_PKG_SRCDIR" + # Cleanup old state: rm -Rf "$TERMUX_PKG_BUILDDIR" \ "$TERMUX_PKG_PACKAGEDIR" \