Gentoo Archives: gentoo-portage-dev

From: Brian Harring <ferringb@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] allow extra info to be echod on die
Date: Wed, 05 Oct 2005 16:48:52
Message-Id: 20051005164801.GC7855@nightcrawler
In Reply to: [gentoo-portage-dev] allow extra info to be echod on die by Thomas Matthijs
1 On Wed, Oct 05, 2005 at 04:33:17PM +0000, Thomas Matthijs wrote:
2 > Hi,
3 >
4 > I would really like a way to echo more information when a die happens so
5 > the users can paste it in their bug report
6 >
7 > Only needs a very simple change to ebuild.sh:
8 >
9 EBUILD_DEATH_HOOKS=''
10
11 diefunc() {
12 local funcname="$1" lineno="$2" exitcode="$3"
13 shift 3
14 @@ -289,6 +291,7 @@
15 echo "!!! ${*:-(no error message)}" >&2
16 echo "!!! If you need support, post the topmost build error, NOT this status message." >&2
17 echo >&2
18 + for x in $EBUILD_DEATH_HOOKS; do
19 + ${x} "$1" "$2" "$3"
20 + done
21 exit 1
22 }
23 ^^^ something like that I think is a bit better; passing the diefunc
24 args to the hooks also.
25 ~harring

Replies

Subject Author
Re: [gentoo-portage-dev] allow extra info to be echod on die Brian Harring <ferringb@g.o>