From: "Ulrich Müller" <ulm@gentoo.org>
To: Florian Schmaus <flow@gentoo.org>
Cc: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] New eclass: eapi9-pipestatus.eclass
Date: Wed, 27 Nov 2024 13:32:39 +0100 [thread overview]
Message-ID: <ued2wamc8@gentoo.org> (raw)
In-Reply-To: <ba775d83-2532-439d-bef1-8e478475aea6@gentoo.org> (Florian Schmaus's message of "Wed, 27 Nov 2024 11:41:02 +0100")
[-- Attachment #1: Type: text/plain, Size: 1951 bytes --]
>>>>> On Wed, 27 Nov 2024, Florian Schmaus wrote:
>> ╓────
>> ║ Tests the shell's pipe status array, i.e. the exit status of the
>> ║ command(s) in the most recently executed foreground pipeline.
>> ║ Returns shell true (0) if all elements are zero, or the last
>> ║ non-zero element otherwise. If called with -v as the first argument,
>> ║ also outputs the pipe status array as a space-separated list.
>> ╙────
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
prev parent reply other threads:[~2024-11-27 12:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-24 12:24 [gentoo-dev] New eclass: eapi9-pipestatus.eclass Ulrich Müller
2024-11-24 12:58 ` Michał Górny
2024-11-24 14:12 ` Ulrich Müller
2024-11-26 6:52 ` [gentoo-dev] New eclass v2: eapi9-pipestatus.eclass Ulrich Müller
2024-11-27 10:41 ` [gentoo-dev] New eclass: eapi9-pipestatus.eclass Florian Schmaus
2024-11-27 11:52 ` Michał Górny
2024-11-27 12:32 ` Ulrich Müller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ued2wamc8@gentoo.org \
--to=ulm@gentoo.org \
--cc=flow@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox