From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 90347158009 for ; Mon, 26 Jun 2023 02:00:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F3A28E0909; Mon, 26 Jun 2023 02:00:15 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B1A50E08A4 for ; Mon, 26 Jun 2023 02:00:15 +0000 (UTC) References: <20230625175156.1368764-1-floppym@gentoo.org> <4a863d6015c54ecbe9f098999158ed6c1be1511c.camel@gentoo.org> User-agent: mu4e 1.10.4; emacs 29.0.92 From: Sam James 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 In-reply-to: Message-ID: <87v8fb2dat.fsf@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Archives-Salt: 1c0aa103-8bcd-41af-b773-10a7791dd1dd X-Archives-Hash: 35e8f1c7b4de8e43a7d22821588fac5c --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mike Gilbert writes: > On Sun, Jun 25, 2023 at 2:52=E2=80=AFPM Micha=C5=82 G=C3=B3rny 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 ${stat= us} > > 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOUEARYKAI0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCZJjxKl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MA8cc2FtQGdlbnRv by5vcmcACgkQc4QJ9SDfkZBLewEAuX9FjvJ++zOe86QJF2zXqpxmIRLY6xNvBHmM /D9fRdcA/jzzgfzt52aqOVOPfgbKc+sKLju5MtglkWeOgCrt7QQA =OTt2 -----END PGP SIGNATURE----- --=-=-=--