commit:     b8a2cd690c871c96d9e240a0da29d83df1a36426
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 21 17:34:16 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 21 17:36:01 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=b8a2cd69

EAPI=9: ban assert and introduce pipestatus instead

Bug: https://bugs.gentoo.org/566342
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 data/lib/pkgcore/ebd/eapi/9/global.bash | 21 +++++++++++++++++++++
 data/lib/pkgcore/ebd/eapi/9/phase.bash  |  1 +
 2 files changed, 22 insertions(+)

diff --git a/data/lib/pkgcore/ebd/eapi/9/global.bash 
b/data/lib/pkgcore/ebd/eapi/9/global.bash
new file mode 100644
index 00000000..60ff0acd
--- /dev/null
+++ b/data/lib/pkgcore/ebd/eapi/9/global.bash
@@ -0,0 +1,21 @@
+# (c) 2024-2025 Gentoo Authors
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+pipestatus() {
+       # copied from eapi9-pipestatus.eclass
+       local status=( "${PIPESTATUS[@]}" )
+       local s ret=0 verbose=""
+
+       [[ ${1} == -v ]] && { verbose=1; shift; }
+       [[ $# -ne 0 ]] && die "usage: ${FUNCNAME} [-v]"
+
+       for s in "${status[@]}"; do
+               [[ ${s} -ne 0 ]] && ret=${s}
+       done
+
+       [[ ${verbose} ]] && echo "${status[@]}"
+
+       return "${ret}"
+}
+
+:

diff --git a/data/lib/pkgcore/ebd/eapi/9/phase.bash 
b/data/lib/pkgcore/ebd/eapi/9/phase.bash
new file mode 100644
index 00000000..881a4882
--- /dev/null
+++ b/data/lib/pkgcore/ebd/eapi/9/phase.bash
@@ -0,0 +1 @@
+PKGCORE_BANNED_FUNCS=( assert )

Reply via email to