commit:     110f999894f2dfef4b5d9aff9cc999c1cf0d1283
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon May  9 16:35:08 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun May 22 14:50:46 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=110f9998

bin/*.sh: pull logical operators into extended-test bultin expression

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 bin/ebuild.sh          | 2 +-
 bin/phase-functions.sh | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 056372283..dbadd7919 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -556,7 +556,7 @@ if ! has "$EBUILD_PHASE" clean cleanrm depend && \
                y="PORTAGE_${x}"
                if [[ -z "${!x}" ]]; then
                        export ${x}="${!y}"
-               elif [[ -n "${!y}" ]] && [[ "${!y}" != "${!x}" ]]; then
+               elif [[ -n "${!y}" && "${!y}" != "${!x}" ]]; then
                        # filter out dupes
                        export ${x}="$(printf "${!y}:${!x}" | tr ":" "\0" | \
                                sort -z -u | tr "\0" ":")"

diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 5aba2519c..0a36af297 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -988,7 +988,7 @@ __ebuild_main() {
                        ewarn  "pkg_${1}() is not defined: '${EBUILD##*/}'"
                fi
                export SANDBOX_ON="0"
-               if [[ "${PORTAGE_DEBUG}" != "1" ]] || [[ "${-/x/}" != "$-" ]]; 
then
+               if [[ "${PORTAGE_DEBUG}" != "1" || "${-/x/}" != "$-" ]]; then
                        __ebuild_phase_with_hooks pkg_${1}
                else
                        set -x
@@ -1055,7 +1055,7 @@ __ebuild_main() {
                        ;;
                esac
 
-               if [[ "${PORTAGE_DEBUG}" != "1" ]] || [[ "${-/x/}" != "$-" ]]; 
then
+               if [[ "${PORTAGE_DEBUG}" != "1" || "${-/x/}" != "$-" ]]; then
                        __dyn_${1}
                else
                        set -x
@@ -1069,7 +1069,7 @@ __ebuild_main() {
                #for example, awking and piping a file in /tmp requires a temp 
file to be created
                #in /etc.  If pkg_setup is in the sandbox, both our lilo and 
apache ebuilds break.
                export SANDBOX_ON="0"
-               if [[ "${PORTAGE_DEBUG}" != "1" ]] || [[ "${-/x/}" != "$-" ]]; 
then
+               if [[ "${PORTAGE_DEBUG}" != "1" || "${-/x/}" != "$-" ]]; then
                        __dyn_${1}
                else
                        set -x

Reply via email to