Gentoo Archives: gentoo-dev

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Making dobin, doexe, doins, doman, dodoc die by default
Date: Mon, 17 Jul 2006 23:49:07
Message-Id: 20060717234542.GE16219@curie-int.orbis-terrarum.net
In Reply to: Re: [gentoo-dev] Making dobin, doexe, doins, doman, dodoc die by default by Mike Frysinger
1 On Mon, Jul 17, 2006 at 06:00:04PM -0400, Mike Frysinger wrote:
2 > at this point i'm against it due to the loss of information/granularity in the
3 > die message ... and utilizing DIE_MSG is garbage
4 >
5 > if die can be made more useful, then i'd be for the do* functions calling die
6 > for me
7 > -mike
8
9 How about changing the internals of dobin etc to behave like this
10 (puesdo-code):
11
12 in ebuild:
13 dobin xyz
14
15 in dobin code:
16 (existing stuff)
17 [ (check failure) ] && die "Failure: dobin $@"
18
19 So if 'dobin xyz' fails, you get a die, with the message of
20 "Failure: dobin xyz"
21
22 This hooks nicely into the existing stacktrace:
23
24 !!! ERROR: dev-lang/php-5.1.4-r1 failed.
25 Call stack:
26 ebuild.sh, line XXX: Called dyn_install
27 ebuild.sh, line XXX: Called src_install
28 php-5.1.4-r1.ebuild, line XXX: Called php5_1-sapi_src_install
29 php5_1-sapi.eclass, line XXX: Called dobin
30 dobin, line XXX: called die
31
32 Additionally, keep DIE_MSG support for anybody that wants to override the
33 default messages.
34
35 --
36 Robin Hugh Johnson
37 E-Mail : robbat2@g.o
38 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85