All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/brltty: fix infinite loop in configure
@ 2022-10-15 17:09 James Hilliard
  0 siblings, 0 replies; only message in thread
From: James Hilliard @ 2022-10-15 17:09 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Mario Lang

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 <james.hilliard1@gmail.com>
---
 ...ushProgramTerminationCommand-shell-f.patch | 107 ++++++++++++++++++
 1 file changed, 107 insertions(+)
 create mode 100644 package/brltty/0002-Revert-Add-the-pushProgramTerminationCommand-shell-f.patch

diff --git a/package/brltty/0002-Revert-Add-the-pushProgramTerminationCommand-shell-f.patch b/package/brltty/0002-Revert-Add-the-pushProgramTerminationCommand-shell-f.patch
new file mode 100644
index 0000000000..f5653342e2
--- /dev/null
+++ b/package/brltty/0002-Revert-Add-the-pushProgramTerminationCommand-shell-f.patch
@@ -0,0 +1,107 @@
+From 941acbb1caa8a85454a491364e74fb273223b7fb Mon Sep 17 00:00:00 2001
+From: James Hilliard <james.hilliard1@gmail.com>
+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 <james.hilliard1@gmail.com>
+[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
+
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-15 17:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-15 17:09 [Buildroot] [PATCH 1/1] package/brltty: fix infinite loop in configure James Hilliard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.