commit:     a959ea2dd7734d6ac5d374e45f7b5ba43949476e
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 27 15:11:54 2025 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Nov 28 08:18:13 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a959ea2d

phase-helpers.sh: Move assert() from isolated-functions to here

assert() is no longer used internally.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 bin/isolated-functions.sh | 8 --------
 bin/phase-helpers.sh      | 8 ++++++++
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 7d43d71314..a7dd6d78c9 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -22,14 +22,6 @@ fi
 # It _must_ preceed all the calls to die and assert.
 shopt -s expand_aliases
 
-assert() {
-       local x pipestatus=( "${PIPESTATUS[@]}" )
-       ___eapi_has_assert || die "'${FUNCNAME}' banned in EAPI ${EAPI}"
-       for x in "${pipestatus[@]}"; do
-               [[ ${x} -eq 0 ]] || die "$@"
-       done
-}
-
 # Simplified version of pipestatus() for internal use
 __pipestatus() {
        local status=( "${PIPESTATUS[@]}" ) s ret=0

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 619965e0b9..4b36a0f27f 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -28,6 +28,14 @@ if ! contains_word strip "${PORTAGE_RESTRICT}"; then
         PORTAGE_DOSTRIP+=( / )
 fi
 
+assert() {
+       local x pipestatus=( "${PIPESTATUS[@]}" )
+       ___eapi_has_assert || die "'${FUNCNAME}' banned in EAPI ${EAPI}"
+       for x in "${pipestatus[@]}"; do
+               [[ ${x} -eq 0 ]] || die "$@"
+       done
+}
+
 into() {
        if [[ "$1" == "/" ]]; then
                export __E_DESTTREE=""

Reply via email to