commit:     aa05212aecd990780c7addfffa959c5ab3a9d675
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Thu Jun 26 14:36:01 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 28 02:30:19 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=aa05212a

ebuild.sh: use the += operator to append to variables

As an extension to the Shell Command Language, bash supports the +=
operator, which allows for the values of variables to be appended to.
There are three instances in which the "ebuild.sh" unit can make use of
this operator. Have it do so.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/ebuild.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 05dae724cd..50d2ee3674 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -375,10 +375,10 @@ inherit() {
                        unset $__export_funcs_var
 
                        if ! contains_word "$1" "${INHERITED}"; then
-                               export INHERITED="${INHERITED} $1"
+                               export INHERITED+=" $1"
                        fi
                        if [[ ${ECLASS_DEPTH} -eq 1 ]]; then
-                               export 
PORTAGE_EXPLICIT_INHERIT="${PORTAGE_EXPLICIT_INHERIT} $1"
+                               export PORTAGE_EXPLICIT_INHERIT+=" $1"
                        fi
                fi
 
@@ -771,7 +771,7 @@ else
        if [[ ${EBUILD_PHASE} == test && ${EBUILD_FORCE_TEST} == 1 ]] &&
                ___in_portage_iuse test && ! has test ${USE} ; then
 
-               export USE="${USE} test"
+               export USE+=" test"
        fi
        declare -r USE
 

Reply via email to