From: Sergei Trofimovich Date: Tue, 17 Mar 2020 08:33:20 +0000 (+0000) Subject: flag-o-matic.eclass: add more verbose conditionals X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=86cd2bcb764d253372a22abafcf4b54ddbe7a72b;p=gentoo.git flag-o-matic.eclass: add more verbose conditionals To ease debugging by pluggins debug statements convert foo || return 1 into if ! foo; then return 1 fi Signed-off-by: Sergei Trofimovich --- diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 39dae290af02..9ef9ac3685e0 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -434,13 +434,20 @@ test-flag-PROG() { local lang=$2 shift 2 - [[ -z ${comp} || -z $1 ]] && return 1 + if [[ -z ${comp} ]]; then + return 1 + fi + if [[ -z $1 ]]; then + return 1 + fi # verify selected compiler exists before using it comp=($(tc-get${comp})) # 'comp' can already contain compiler options. # 'type' needs a binary name - type -p ${comp[0]} >/dev/null || return 1 + if ! type -p ${comp[0]} >/dev/null; then + return 1 + fi # Set up test file. local in_src in_ext cmdline_extra=()