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 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