Commit 17cb1ed6 authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

Prevent "BUILD FAILED" appearing twice on `./configure` error

Since `./configure` executes in a bash subshell, it failing would
execute the ERR trap twice: once in a subshell and once in the main
process. An explicit `return 1` skips one of these ERR traps and fixes
double output.

I hope.

[image of I Have No Idea What I'm Doing dog]
parent 0bdd502b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -452,7 +452,8 @@ build_package_standard() {
  ( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then
      export CFLAGS="$CFLAGS ${!PACKAGE_CFLAGS}"
    fi
    ${!PACKAGE_CONFIGURE:-./configure} --prefix="${!PACKAGE_PREFIX_PATH:-$PREFIX_PATH}" $CONFIGURE_OPTS ${!PACKAGE_CONFIGURE_OPTS} "${!PACKAGE_CONFIGURE_OPTS_ARRAY}"
    ${!PACKAGE_CONFIGURE:-./configure} --prefix="${!PACKAGE_PREFIX_PATH:-$PREFIX_PATH}" \
      $CONFIGURE_OPTS ${!PACKAGE_CONFIGURE_OPTS} "${!PACKAGE_CONFIGURE_OPTS_ARRAY}" || return 1
  ) >&4 2>&1

  { "$MAKE" $MAKE_OPTS ${!PACKAGE_MAKE_OPTS} "${!PACKAGE_MAKE_OPTS_ARRAY}"