mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
nginx{,-module}.eclass: do not fail if econf_ngx --help is called
NGINX's ./configure return 1 if "--help" is passed. edo does not like it and thinks the command failed. The previous code was incorrect in how it handled the "--help" case. edo actually never failed (since it was always called with nonfatal, even when no "--help" was passed), only showed the edo's "Failed to run command" message. This commit fixes the --help and all other cases altogether, making econf_ngx fail when necessary and shut when not. Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42895 Closes: https://github.com/gentoo/gentoo/pull/42895 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
4eb0d941de
commit
f414b6c3a5
@ -109,12 +109,15 @@ econf_ngx() {
|
||||
debug-print-function "${FUNCNAME[0]}" "$@"
|
||||
[[ ! -x ./configure ]] &&
|
||||
die "./configure is not present in the current working directory or is not executable"
|
||||
nonfatal edo ./configure "$@"
|
||||
# For some reason, NGINX's ./configure returns 1 if it is used with the
|
||||
# '--help' argument.
|
||||
if [[ $? -ne 0 && "$1" != --help ]]; then
|
||||
die -n "./configure ${*@Q} failed"
|
||||
if [[ $1 == --help ]]; then
|
||||
# For some reason, NGINX ./configure returns 1 if it is used with the
|
||||
# '--help' argument.
|
||||
#
|
||||
# Executing this without edo gets rid of the "Failed to run" message.
|
||||
./configure "$@"
|
||||
return
|
||||
fi
|
||||
edo ./configure "$@"
|
||||
}
|
||||
|
||||
# @FUNCTION: ngx_mod_pkg_to_sonames
|
||||
|
||||
@ -267,12 +267,15 @@ econf_ngx() {
|
||||
debug-print-function "${FUNCNAME[0]}" "$@"
|
||||
[[ -x ./configure ]] ||
|
||||
die "./configure is not present in the current working directory or is not executable"
|
||||
nonfatal edo ./configure "$@"
|
||||
# For some reason, NGINX ./configure returns 1 if it is used with the
|
||||
# '--help' argument.
|
||||
if [[ $? -ne 0 && $1 != --help ]]; then
|
||||
die -n "./configure ${*@Q} failed"
|
||||
if [[ $1 == --help ]]; then
|
||||
# For some reason, NGINX ./configure returns 1 if it is used with the
|
||||
# '--help' argument.
|
||||
#
|
||||
# Executing this without edo gets rid of the "Failed to run" message.
|
||||
./configure "$@"
|
||||
return
|
||||
fi
|
||||
edo ./configure "$@"
|
||||
}
|
||||
|
||||
#-----> USE logic <-----
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user