commit:     96ba24a7da70f7149a071c98be37461df50b83e7
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:07:45 2022 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:07:45 2022 +0000
URL:        
https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=96ba24a7

autoconf-wrapper: make sure we break on first match, not last

The intention was that we break on the first match in WANT_AUTOCONF,
so add that missing break statement.  In practice, people only ever
set one value in WANT_AUTOCONF, so that's probably why no one has
ever noticed this bug before.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 ac-wrapper.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 4682082..57324bb 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -117,6 +117,7 @@ if [ -n "${WANT_AUTOCONF}" ] ; then
                        if [ -x "${full_argv0}-${wx}" ] ; then
                                binary="${full_argv0}-${wx}"
                                v="x"
+                               break
                        elif [ "${wx}" = "2.5" ] ; then
                                if [ "${auto_ver}" = "2.13" ] ; then
                                        # The "2.5" alias accepts every version 
except 2.13.
@@ -125,6 +126,7 @@ if [ -n "${WANT_AUTOCONF}" ] ; then
                                if [ -x "${full_argv0}-${auto_ver}" ] ; then
                                        binary="${full_argv0}-${auto_ver}"
                                        v="x"
+                                       break
                                fi
                        fi
                done

Reply via email to