From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (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 6DED81581F2 for ; Thu, 12 Dec 2024 17:03:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F2742E099C; Thu, 12 Dec 2024 17:03:29 +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 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D5B04E099F for ; Thu, 12 Dec 2024 17:03:29 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0E6DC341B52 for ; Thu, 12 Dec 2024 17:03:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 329F11F45 for ; Thu, 12 Dec 2024 17:03:26 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1734022923.5293d4b91dabb4c61afc4990b4f177d273f0fc80.flow@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/texlive-module.eclass X-VCS-Directories: eclass/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 5293d4b91dabb4c61afc4990b4f177d273f0fc80 X-VCS-Branch: master Date: Thu, 12 Dec 2024 17:03:26 +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: d4df1173-c14e-402e-83f5-3394c68d3d01 X-Archives-Hash: 2cc83af8559590850a2bafd645210df4 commit: 5293d4b91dabb4c61afc4990b4f177d273f0fc80 Author: Florian Schmaus gentoo org> AuthorDate: Wed Dec 11 08:49:42 2024 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Thu Dec 12 17:02:03 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5293d4b9 texlive-module.eclass: use pipestatus Signed-off-by: Florian Schmaus gentoo.org> eclass/texlive-module.eclass | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass index f8b6f0858cd6..ebd65e3dd0d8 100644 --- a/eclass/texlive-module.eclass +++ b/eclass/texlive-module.eclass @@ -79,7 +79,7 @@ esac if [[ -z ${_TEXLIVE_MODULE_ECLASS} ]]; then _TEXLIVE_MODULE_ECLASS=1 -inherit texlive-common +inherit eapi9-pipestatus texlive-common HOMEPAGE="https://www.tug.org/texlive/" @@ -537,16 +537,15 @@ texlive-module_src_install() { grep_expressions+=(-e "/${f//./\\.}\$") done + local status + # "success-status aware grep", returning exit status 0 instead of 1. + _sgrep() { grep "$@"; return "$(( $? <= 1 ? 0 : $? ))"; } ebegin "Installing man pages" find texmf-dist/doc/man -type f -name '*.[0-9n]' -print | - grep -v "${grep_expressions[@]}" | + _sgrep -v "${grep_expressions[@]}" | xargs -d '\n' --no-run-if-empty nonfatal doman - local pipestatus="${PIPESTATUS[*]}" - # The grep in the middle of the pipe may return 1 in case - # everything from the input is dropped. - # See https://bugs.gentoo.org/931994 - [[ ${pipestatus} == "0 "[01]" 0" ]] - eend $? || die "error installing man pages (pipestatus: ${pipestatus})" + status=$(pipestatus -v) + eend $? || die "error installing man pages (PIPESTATUS: ${status})" # Delete all man pages under texmf-dist/doc/man find texmf-dist/doc/man -type f -name '*.[0-9n]' -delete ||