From: Sam James <sam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH] acct-user.eclass: include exit status in death message
Date: Mon, 26 Jun 2023 03:00:05 +0100 [thread overview]
Message-ID: <87v8fb2dat.fsf@gentoo.org> (raw)
In-Reply-To: <CAJ0EP42Vg3Vjz1CLOp98xvBQNBaY09c3LWvgxb3RBR_t3drcZg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
Mike Gilbert <floppym@gentoo.org> writes:
> On Sun, Jun 25, 2023 at 2:52 PM Michał Górny <mgorny@gentoo.org> wrote:
>>
>> I think a better approach would be to always include $? in die messages
>> in Portage.
>
> It's a nice idea, but will not work in the case where die is not
> called immediately after the failing command.
>
> A couple of possible workarounds that could be used to reset $? before
> calling die:
>
> 1. Exit in a subshell: (exit ${status})
> 2. Return from a function: set_status() { return $1; }; set_status ${status}
>
> In any case, I would like to apply the acct-user.eclass patch soonish
> to help with debugging an error during stage building that releng
> reported to me in IRC. We can revisit changing the die function and
> possibly revert this patch later.
lgtm then
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]
prev parent reply other threads:[~2023-06-26 2:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-25 17:51 [gentoo-dev] [PATCH] acct-user.eclass: include exit status in death message Mike Gilbert
2023-06-25 18:52 ` Michał Górny
2023-06-25 20:15 ` Oskari Pirhonen
2023-06-25 22:15 ` Mike Gilbert
2023-06-26 2:00 ` Sam James [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=87v8fb2dat.fsf@gentoo.org \
--to=sam@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