commit:     d4751f628c52a5511a4f4d1ffac756c74631e21a
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Jun 27 08:00:24 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 28 02:30:23 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=d4751f62

phase-functions.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 "phase-functions.sh" unit can
benefit from 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/phase-functions.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index ec1e1e03a8..5cc6d6a54b 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -123,12 +123,12 @@ __filter_readonly_variables() {
        fi
 
        if has --filter-sandbox "$@"; then
-               filtered_vars="${filtered_vars} SANDBOX_.*"
+               filtered_vars+=" SANDBOX_.*"
        else
-               filtered_vars="${filtered_vars} ${filtered_sandbox_vars}"
+               filtered_vars+=" ${filtered_sandbox_vars}"
        fi
        if has --filter-features "$@"; then
-               filtered_vars="${filtered_vars} FEATURES PORTAGE_FEATURES"
+               filtered_vars+=" FEATURES PORTAGE_FEATURES"
        fi
        if has --filter-path "$@"; then
                filtered_vars+=" PATH"

Reply via email to