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 (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C98D31581D3 for ; Mon, 20 May 2024 11:10:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EA6A8E29FF; Mon, 20 May 2024 11:10:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 932B8E29CF for ; Mon, 20 May 2024 11:10:31 +0000 (UTC) From: Florian Schmaus To: gentoo-dev@lists.gentoo.org Cc: tex@gentoo.org, Florian Schmaus Subject: [gentoo-dev] [PATCH 1/3] texlive-module.eclass: do not treat grep returning 1 as error Date: Mon, 20 May 2024 13:10:17 +0200 Message-ID: <20240520111019.418462-1-flow@gentoo.org> X-Mailer: git-send-email 2.44.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 7cecbbad-2a9d-46e2-b7ac-97ddca1d4e81 X-Archives-Hash: c05cc9997f875ffbff6b7daa442afd7b In case every man page of the dev-texlive/* package is filtered, because the man pages are already installed by texlive-core, grep returns an exit status of 1, which we must not treat as an error condition. Adjust the PIPESTATUS comparison accordingly. Closes: https://bugs.gentoo.org/931994 Signed-off-by: Florian Schmaus --- eclass/texlive-module.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass index 0daca41961ff..b202a0188b66 100644 --- a/eclass/texlive-module.eclass +++ b/eclass/texlive-module.eclass @@ -539,7 +539,10 @@ texlive-module_src_install() { find texmf-dist/doc/man -type f -name '*.[0-9n]' -print | grep -v "${grep_expressions[@]}" | xargs -d '\n' --no-run-if-empty doman - [[ "${PIPESTATUS[*]}" =~ ^0(" 0")*$ ]] + # 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" # Delete all man pages under texmf-dist/doc/man -- 2.44.1