Re: [gentoo-dev] [PATCH] acct-user.eclass: include exit status in death message

2023-06-25 Thread Sam James
Mike Gilbert writes: > On Sun, Jun 25, 2023 at 2:52 PM Michał Górny 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 coup

Re: [gentoo-dev] [PATCH] acct-user.eclass: include exit status in death message

2023-06-25 Thread Mike Gilbert
On Sun, Jun 25, 2023 at 2:52 PM Michał Górny 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

Re: [gentoo-dev] [PATCH] acct-user.eclass: include exit status in death message

2023-06-25 Thread Oskari Pirhonen
On Sun, Jun 25, 2023 at 20:52:53 +0200, Michał Górny wrote: > I think a better approach would be to always include $? in die messages > in Portage. > I'm not sure the exit code is useful in the general case. Something like rm(1) seems to give the same exit code despite failing for different reaso

Re: [gentoo-dev] [PATCH] acct-user.eclass: include exit status in death message

2023-06-25 Thread Michał Górny
I think a better approach would be to always include $? in die messages in Portage. -- Best regards, Michał Górny