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 5D48A1581F3 for ; Wed, 27 Nov 2024 12:32:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D1516E07FA; Wed, 27 Nov 2024 12:32:45 +0000 (UTC) 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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4E09AE07EC for ; Wed, 27 Nov 2024 12:32:45 +0000 (UTC) From: =?utf-8?Q?Ulrich_M=C3=BCller?= To: Florian Schmaus Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] New eclass: eapi9-pipestatus.eclass In-Reply-To: (Florian Schmaus's message of "Wed, 27 Nov 2024 11:41:02 +0100") References: Date: Wed, 27 Nov 2024 13:32:39 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) 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-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Archives-Salt: e86bc426-d6fb-46e5-a222-8f6e7bd8caf5 X-Archives-Hash: 13b0e787893e8273ad70211d3b3a5847 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> On Wed, 27 Nov 2024, Florian Schmaus wrote: >> =E2=95=93=E2=94=80=E2=94=80=E2=94=80=E2=94=80 >> =E2=95=91 Tests the shell's pipe status array, i.e. the exit status of t= he >> =E2=95=91 command(s) in the most recently executed foreground pipeline. >> =E2=95=91 Returns shell true (0) if all elements are zero, or the last >> =E2=95=91 non-zero element otherwise. If called with -v as the first arg= ument, >> =E2=95=91 also outputs the pipe status array as a space-separated list. >> =E2=95=99=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > Thanks again for putting effort into this ulm. > When this was discussed in #-qa one initial version of pipestatus() > had support for specifying non-zero exit statues as success indication > for certain commands in the pipe. The prime example being 'grep' > returning 1 if no input matched. > One proposed version had support for this, but it was removed in later > version and the discussion in #-qa shifted towards how the value of > PIPESTATUS can be preserved to be included in a potential error > message. > I agree that we should drop 'assert' and that dropping it requires a > sensible named alternative. And the proposed version of pipestatus() > is a functional equivalent alternative. > However, I am not sure why the proposed pipestatus() does no longer > include support for specifying non-zero exit statuses as success > indication. > I looked forward to use pipestatus() in texlive-modules.eclass [1], > but since the pipe includes a 'grep', which is not uncommon, I can not > use what is currently proposed. > It seems strange to me to go this far, but then drop the ball on the > last meter. > Could we please consider re-adding support for this? I have dropped the feature because feedback in bug 566342 was very negative. The main argument was it would unnecessarily complicate the function, in order to account for a corner case. In the discussion it was suggested to introduce a wrapper instead; this is now bug 945110. Ulrich --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmdHEWcPHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4uJRAIAKeoetZJJ6WwJqtZx/9CzV/MDipWz2hap3A3 ipgomj+MBGCrEHCleIoD/GtWn7CgJT6W4Cc3/jsV9d3W9UJpXkakRlTeFYTFL6PX 2tBgMoBwiNqmnJf2FbG/yOaV88cOhFSc+PPyfgjnhxIOj0UyoAgV0pO4iiQ747L1 2yAFvBtWCF618CvZGp2dK42gCsBhj2+UZ8sqvkq7A6u/Ugxlq+cXXu6TZv/765me pZlcqgDSt39zeBNPSJU0EBDbrcStP57H5rcCEwL8TELSjFjNZPo0QMOtt6CLKeXs fbaZOYfM6jaLpssXC/QpJlqP5fS6hhwdaEF7KhdFJe/jKNiK3LM= =OAy7 -----END PGP SIGNATURE----- --=-=-=--