From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.50) id 1ENENN-0004k1-Hd for garchives@archives.gentoo.org; Wed, 05 Oct 2005 18:52:25 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id j95Igk6i011686; Wed, 5 Oct 2005 18:42:46 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id j95IciT5008151; Wed, 5 Oct 2005 18:38:45 GMT Received: from cpe-65-26-255-237.wi.res.rr.com ([65.26.255.237] helo=nightcrawler) by smtp.gentoo.org with esmtpa (Exim 4.43) id 1ENEIK-0002Vv-4l; Wed, 05 Oct 2005 18:47:12 +0000 Date: Wed, 5 Oct 2005 13:47:09 -0500 From: Brian Harring To: gentoo-portage-dev@lists.gentoo.org Cc: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] Re: [gentoo-portage-dev] allow extra info to be echod on die Message-ID: <20051005184709.GD7855@nightcrawler> References: <20051005163317.GA6783@toucan.gentoo.org> <20051005164801.GC7855@nightcrawler> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="d9ADC0YsG2v16Js0" Content-Disposition: inline In-Reply-To: <20051005164801.GC7855@nightcrawler> User-Agent: Mutt/1.5.8i X-Archives-Salt: a87f8215-0038-4385-a632-4fac51015c39 X-Archives-Hash: c44f4b89f80f90f2cc00d51814664f8a --d9ADC0YsG2v16Js0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Just an addendum to this... it went in, will be available in=20 2.0.51_rc4 and up. If you want all registered death funcs to kick in, EBUILD_DEATH_HOOKS=3D"$EBUILD_DEATH_HOOKS the_name_of_your_func" or if you want just your func to run EBUILD_DEATH_HOOKS=3D"the_name_of_your_func" CC'ing gentoo-dev, since I'd expect some devs would be interested in=20 it. ~harring On Wed, Oct 05, 2005 at 11:48:01AM -0500, Brian Harring wrote: > On Wed, Oct 05, 2005 at 04:33:17PM +0000, Thomas Matthijs wrote: > > Hi, > >=20 > > I would really like a way to echo more information when a die happens so > > the users can paste it in their bug report > >=20 > > Only needs a very simple change to ebuild.sh: > >=20 > EBUILD_DEATH_HOOKS=3D'' >=20 > diefunc() { > local funcname=3D"$1" lineno=3D"$2" exitcode=3D"$3" > shift 3 > @@ -289,6 +291,7 @@ > echo "!!! ${*:-(no error message)}" >&2 > echo "!!! If you need support, post the topmost build error, NOT = this status message." >&2 > echo >&2 > + for x in $EBUILD_DEATH_HOOKS; do > + ${x} "$1" "$2" "$3" > + done > exit 1 > } > ^^^ something like that I think is a bit better; passing the diefunc=20 > args to the hooks also. > ~harring --d9ADC0YsG2v16Js0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDRB+svdBxRoA3VU0RAh1fAKDWkUnjBlb01JXOotEbgBSuzVVcYwCglc+j 2RqAGjNp6xvAXrOJqNPg8hI= =HpsP -----END PGP SIGNATURE----- --d9ADC0YsG2v16Js0-- -- gentoo-dev@gentoo.org mailing list