[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: Re: [gentoo-dev] [PATCH] acct-user.eclass: include exit status in death message
From: Sam James <sam () gentoo ! org>
Date: 2023-06-26 1:59:42
Message-ID: 87v8fb2dat.fsf () gentoo ! org
[Download RAW message or body]
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
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic