From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6A13D15827B for ; Sun, 17 Aug 2025 19:06:15 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 5223E335D7B for ; Sun, 17 Aug 2025 19:06:15 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id DEEDB110562; Sun, 17 Aug 2025 19:06:06 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id D68B5110562 for ; Sun, 17 Aug 2025 19:06:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8C927340BB4 for ; Sun, 17 Aug 2025 19:06:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C28F23367 for ; Sun, 17 Aug 2025 19:06:04 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1755457236.4917a7da16ac5450451f54d4685be1d8b403f9ad.ulm@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/eapi.sh bin/phase-helpers.sh bin/save-ebuild-env.sh X-VCS-Directories: bin/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 4917a7da16ac5450451f54d4685be1d8b403f9ad X-VCS-Branch: master Date: Sun, 17 Aug 2025 19:06:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 789208d3-2257-414e-a4dc-a04d5fbea060 X-Archives-Hash: 77a38199c05ec4226424e34980e4f350 commit: 4917a7da16ac5450451f54d4685be1d8b403f9ad Author: Ulrich Müller gentoo org> AuthorDate: Mon Jun 9 08:04:21 2025 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sun Aug 17 19:00:36 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4917a7da EAPI 9 has pipestatus Signed-off-by: Ulrich Müller gentoo.org> bin/eapi.sh | 1 + bin/phase-helpers.sh | 17 +++++++++++++++++ bin/save-ebuild-env.sh | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/bin/eapi.sh b/bin/eapi.sh index 272d9e4a74..8e51a8ac54 100644 --- a/bin/eapi.sh +++ b/bin/eapi.sh @@ -42,6 +42,7 @@ ___eapi_has_hasq() [[ ${1-${EAPI-0}} == [0-7] ]] ___eapi_has_hasv() [[ ${1-${EAPI-0}} == [0-7] ]] ___eapi_has_in_iuse() [[ ${1-${EAPI-0}} != [0-5] ]] ___eapi_has_nonfatal() [[ ${1-${EAPI-0}} != [0-3] ]] +___eapi_has_pipestatus() [[ ${1-${EAPI-0}} != [0-8] ]] ___eapi_has_useq() [[ ${1-${EAPI-0}} == [0-7] ]] ___eapi_has_usex() [[ ${1-${EAPI-0}} != [0-4] ]] ___eapi_has_version_functions() [[ ${1-${EAPI-0}} != [0-6] ]] diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 89f1f6f2f8..e97ebc7169 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -1162,3 +1162,20 @@ if ___eapi_has_in_iuse; then contains_word "$1" "${IUSE_EFFECTIVE}" } fi + +if ___eapi_has_pipestatus; then + pipestatus() { + local status=( "${PIPESTATUS[@]}" ) + local s ret=0 verbose="" + + [[ ${1} == -v ]] && { verbose=1; shift; } + [[ $# -ne 0 ]] && die "usage: pipestatus [-v]" + + for s in "${status[@]}"; do + [[ ${s} -ne 0 ]] && ret=${s} + done + + [[ ${verbose} ]] && echo "${status[@]}" + return "${ret}" + } +fi diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh index 32837e8950..242b58b70f 100644 --- a/bin/save-ebuild-env.sh +++ b/bin/save-ebuild-env.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @FUNCTION: __save_ebuild_env @@ -130,6 +130,7 @@ __save_ebuild_env() ( ___eapi_has_in_iuse && REPLY+=( in_iuse ) ___eapi_has_eapply && REPLY+=( __eapply_patch eapply patch ) ___eapi_has_usex && REPLY+=( usex ) + ___eapi_has_pipestatus && REPLY+=( pipestatus ) # Destroy the collected functions. unset -f "${REPLY[@]}"