Gentoo Archives: gentoo-dev

From: Donnie Berkholz <dberkholz@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 22:40:45
Message-Id: 20070926222917.GU22279@supernova
In Reply to: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-portage/genlop: ChangeLog genlop-0.30.8.ebuild by Doug Goldstein
1 On 17:53 Wed 26 Sep , Doug Goldstein wrote:
2 > Mike Frysinger wrote:
3 > > Donnie Berkholz wrote:
4 > > also, ebuilds do change over time, so what line # may be correct one day may
5 > > not be relevant the next ...
6 > >
7 > True. I will concede this point. I could attempt to argue this is why
8 > it's important to know the version and revision of the package you are
9 > emerging. But the counter point is evident, times when the ebuild is
10 > changed without a bump pose a problem.
11 >
12 > Which could bring up a point of would it be useful to see if we can
13 > print out the actual line that caused the die. Now, I don't know if this
14 > feasible or something the Portage devs want to do. But again, in the
15 > effort to streamline this might be something to consider.
16
17 The backtrace code is in ebuild.sh:dump_trace(). If you can find a way
18 in bash to print the source line, that would be great. I took another
19 glance through the bash man page and didn't see much from that end. But
20 since we do have the source file and line number, we could just grab it
21 with some hack like:
22
23 sed -ne "${lineno}p" ${filename}
24
25 Anyone got something better?
26
27 > >> That prompts the question, should we get rid of die messages?
28 > >>
29 > >
30 > > perhaps de-emphasize their general worth, but not get rid of them
31 > > -mike
32 > >
33 > Which is what I'm after. Let's not force people to put a pointless
34 > message in there if it's going to be pointless. Essentially, the
35 > argument here is let's be consistent and put a message always. But a
36 > better plan of action is let's use common sense and add it as needed.
37
38 That sounds reasonable. Anyone reviewing code, please ensure there's a
39 reason if you're suggesting addition of a trivial die message,
40 particularly if we can figure out how to start printing the actual bash
41 code.
42
43 Thanks,
44 Donnie
45 --
46 gentoo-dev@g.o mailing list

Replies