Gentoo Archives: gentoo-dev

From: Joe Peterson <lavajoe@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-portage/genlop: ChangeLog genlop-0.30.8.ebuild
Date: Wed, 26 Sep 2007 23:14:50
Message-Id: 46FAE4B2.1090803@gentoo.org
In Reply to: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-portage/genlop: ChangeLog genlop-0.30.8.ebuild by Ferris McCormick
1 Ferris McCormick wrote:
2 > On Wed, 26 Sep 2007 17:42:01 -0400
3 > Doug Goldstein <cardoe@g.o> wrote:
4 >
5 >> Ferris McCormick wrote:
6 >>> On Wed, 26 Sep 2007 13:42:08 -0700
7 >>> Donnie Berkholz <dberkholz@g.o> wrote:
8 >>>
9 >>>> On 16:11 Wed 26 Sep , Mike Frysinger wrote:
10 >>>>> On Wednesday 26 September 2007, Christian Faulhammer wrote:
11 >>>>>> Joe Peterson <lavajoe@g.o>:
12 >>>>>>> Thanks for the tip. I added "failed to install genlop (via dobin)" -
13 >>>>>>> not sure if there is a standard way to do this, as it seems many
14 >>>>>>> ebuilds just do "dobin failed", and some do "failed to install ...".
15 >>>>>> It is mainly to localise which die command caused the halt. So I
16 >>> know
17 >>>>>> of no standard.
18 >>>>> if there is just one call to die in a function, then i usually dont
19 >>> bother ...
20 >>>>> but if there are multiple ones (possibly nested), then it can
21 >>> easily save
22 >>>>> time
23 >>>> Cardoe was just telling me that die messages are not that useful or
24 >>>> time-saving because portage posts the line number of the failure
25 >>>> already. That prompts the question, should we get rid of die messages?
26 >>>> Thanks,
27 >>>> Donnie
28 >>> No. They might contain useful information. Just the line
29 >>> number of the failure is just frustrating: You don't really
30 >>> necessarily know what went wrong, and you have to go read the ebuild to
31 >>> find out. Users might not appreciate that.
32 >>>> --
33 >>>> gentoo-dev@g.o mailing list
34 >>> Regards,
35 >> die "dobin failed" or something equally vague and pointless is no less
36 >> or more frustrating or informative then a line number. And arguably if
37 >> there's multiple statements that contain die "dobin failed" in an ebuild
38 >> it can set you on the wrong path and is equally and if not more frustrating.
39 >
40 > Well, I was talking about useful die messages of course. 'die "dobin
41 > failed"' is the same as no die message at all. Whoever wrote
42 > 'dobin ... || die "dobin failed"' certainly knows more than that. 'die
43 > "dobin failed"' of course might as well be omitted, but better, it
44 > seems to me, is to make it same something intelligent.
45
46 Looks like almost 1/2 of them are simply "dobin failed":
47
48 find /usr/portage -name "*.ebuild" | xargs grep dobin | grep die | grep
49 '"dobin failed"$' | wc
50 262 1885 24194
51
52 find /usr/portage -name "*.ebuild" | xargs grep dobin | grep die | grep
53 "\"$" | wc
54 548 4183 54643
55
56 -Joe
57 --
58 gentoo-dev@g.o mailing list