From 29f0662c188e7126871fa84f6e6f854cda279c89 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 26 Sep 2018 16:18:23 -0700 Subject: Fix restarting after a complete build It is much, much better to *first* make the directory writable and *then* do a test for case-sensitivity (which requires writing in that directory). Fixes #1033. Signed-off-by: Alexey Neyman diff --git a/scripts/crosstool-NG.sh b/scripts/crosstool-NG.sh index 486f733..7909438 100644 --- a/scripts/crosstool-NG.sh +++ b/scripts/crosstool-NG.sh @@ -304,15 +304,15 @@ CT_DoExecLog ALL mkdir -p "${CT_HOST_COMPLIBS_DIR}" # Only create the state dir if asked for a restartable build [ -n "${CT_DEBUG_CT_SAVE_STEPS}" ] && CT_DoExecLog ALL mkdir -p "${CT_STATE_DIR}" +# Kludge: CT_PREFIX_DIR might have grown read-only if +# the previous build was successful. +CT_DoExecLog ALL chmod -R u+w "${CT_PREFIX_DIR}" + # Check install file system case-sensitiveness CT_DoExecLog DEBUG touch "${CT_PREFIX_DIR}/foo" CT_TestAndAbort "Your file system in '${CT_PREFIX_DIR}' is *not* case-sensitive!" -f "${CT_PREFIX_DIR}/FOO" CT_DoExecLog DEBUG rm -f "${CT_PREFIX_DIR}/foo" -# Kludge: CT_PREFIX_DIR might have grown read-only if -# the previous build was successful. -CT_DoExecLog ALL chmod -R u+w "${CT_PREFIX_DIR}" - # Setting up the rest of the environment only if not restarting if [ -z "${CT_RESTART}" ]; then # Having .. inside CT_PREFIX breaks relocatability. -- cgit v0.10.2-6-g49f6