package/brltty: fix infinite loop in configure
PATCH 1/1 package/brltty: fix infinite loop in configure
Revert a broken commit that introduced an infinite loop during configure.
Fixes:
- http://autobuild.buildroot.net/results/82a/82af705f7ca282495461cb3994f5a7e6f64273e1
- http://autobuild.buildroot.net/results/06c/06c9414a1ecbc1a147bc8dfddced03fc659af694
- http://autobuild.buildroot.net/results/59e/59e36093f7e437a5a37037f7fa50ce2443c47fd3
Signed-off-by James Hilliard <[email protected]>
--- ...ushProgramTerminationCommand-shell-f.patch | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 package/brltty/0002-Revert-Add-the-pushProgramTerminationCommand-shell-f.patch
package/brltty/0002-Revert-Add-the-pushProgramTerminationCommand-shell-f.patch new file +107 -0
@@ -0,0 +1,107 @@ +From 941acbb1caa8a85454a491364e74fb273223b7fb Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Sat, 15 Oct 2022 10:54:57 -0600 +Subject: [PATCH] Revert "Add the pushProgramTerminationCommand shell function. + (dm)" + +Fixes infinite loop during configure: + +config.status: executing build-configure commands +configure: WARNING: libudev support not available +configure: WARNING: Human Interface Device I/O support not available on this platform +./mk4build: 104: let: not found +./mk4build: 104: let: not found +./mk4build: 111: cd: can't cd to /tmp/mk4build.20221015-092924.ZL6KlF +./mk4build: 104: let: not found +./mk4build: 111: cd: can't cd to /tmp/mk4build.20221015-092924.ZL6KlF +./mk4build: 104: let: not found +./mk4build: 111: cd: can't cd to /tmp/mk4build.20221015-092924.ZL6KlF +./mk4build: 104: let: not found +./mk4build: 111: cd: can't cd to /tmp/mk4build.20221015-092924.ZL6KlF +./mk4build: 104: let: not found +./mk4build: 111: cd: can't cd to /tmp/mk4build.20221015-092924.ZL6KlF +./mk4build: 104: let: not found +./mk4build: 111: cd: can't cd to /tmp/mk4build.20221015-092924.ZL6KlF +./mk4build: 104: let: not found +./mk4build: 111: cd: can't cd to /tmp/mk4build.20221015-092924.ZL6KlF +./mk4build: 104: let: not found +./mk4build: 111: cd: can't cd to /tmp/mk4build.20221015-092924.ZL6KlF + +This reverts commit df1e070d30f583381b48fddd829bdde8efcdd16a. + +Signed-off-by: James Hilliard <[email protected]> +[Upstream status: +https://github.com/brltty/brltty/pull/393] +--- + brltty-prologue.sh | 48 +++++++++++++--------------------------------- + 1 file changed, 13 insertions(+), 35 deletions(-) + +diff --git a/brltty-prologue.sh b/brltty-prologue.sh +index 05b817742..a4fa34053 100644 +--- a/brltty-prologue.sh ++++ b/brltty-prologue.sh +@@ -94,41 +94,6 @@ logDetail() { + logMessage detail "${@}" + } + +-programTerminationCommandCount=0 +- +-runProgramTerminationCommands() { +- set +e +- +- while [ "${programTerminationCommandCount}" -gt 0 ] +- do +- set -- $(getVariable "programTerminationCommand${programTerminationCommandCount}") +- let "programTerminationCommandCount -= 1" +- +- local process="${1}" +- local directory="${2}" +- shift 2 +- +- [ "${process}" = "${$}" ] && { +- cd "${directory}" +- "${@}" +- } +- done +-} +- +-pushProgramTerminationCommand() { +- [ "${programTerminationCommandCount}" -gt 0 ] || trap runProgramTerminationCommands exit +- setVariable "programTerminationCommand$((programTerminationCommandCount += 1))" "${$} $(pwd) ${*}" +-} +- +-needTemporaryDirectory() { +- [ -n "${temporaryDirectory}" ] || { +- umask 022 +- [ -n "${TMPDIR}" -a -d "${TMPDIR}" -a -r "${TMPDIR}" -a -w "${TMPDIR}" -a -x "${TMPDIR}" ] || export TMPDIR="/tmp" +- temporaryDirectory="$(mktemp -d "${TMPDIR}/${programName}.$(date +"%Y%m%d-%H%M%S").XXXXXX")" && cd "${temporaryDirectory}" || exit "${?}" +- pushProgramTerminationCommand rm -f -r -- "${temporaryDirectory}" +- } +-} +- + resolveDirectory() { + local path="${1}" + local variable="${2}" +@@ -512,6 +477,19 @@ verifyOutputDirectory() { + fi + } + ++needTemporaryDirectory() { ++ cleanup() { ++ set +e ++ cd / ++ [ -z "${temporaryDirectory}" ] || rm -f -r -- "${temporaryDirectory}" ++ } ++ trap "cleanup" 0 ++ ++ umask 022 ++ [ -n "${TMPDIR}" -a -d "${TMPDIR}" -a -r "${TMPDIR}" -a -w "${TMPDIR}" -a -x "${TMPDIR}" ] || export TMPDIR="/tmp" ++ temporaryDirectory="$(mktemp -d "${TMPDIR}/${programName}.XXXXXX")" && cd "${temporaryDirectory}" || exit "${?}" ++} ++ + programParameterCount=0 + programParameterCountMinimum=-1 + programParameterLabelWidth=0 +-- +2.34.1 +
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot