On 17:53 Wed 26 Sep , Doug Goldstein wrote: > Mike Frysinger wrote: > > Donnie Berkholz wrote: > > also, ebuilds do change over time, so what line # may be correct one day > > may > > not be relevant the next ... > > > True. I will concede this point. I could attempt to argue this is why > it's important to know the version and revision of the package you are > emerging. But the counter point is evident, times when the ebuild is > changed without a bump pose a problem. > > Which could bring up a point of would it be useful to see if we can > print out the actual line that caused the die. Now, I don't know if this > feasible or something the Portage devs want to do. But again, in the > effort to streamline this might be something to consider.
The backtrace code is in ebuild.sh:dump_trace(). If you can find a way in bash to print the source line, that would be great. I took another glance through the bash man page and didn't see much from that end. But since we do have the source file and line number, we could just grab it with some hack like: sed -ne "${lineno}p" ${filename} Anyone got something better? > >> That prompts the question, should we get rid of die messages? > >> > > > > perhaps de-emphasize their general worth, but not get rid of them > > -mike > > > Which is what I'm after. Let's not force people to put a pointless > message in there if it's going to be pointless. Essentially, the > argument here is let's be consistent and put a message always. But a > better plan of action is let's use common sense and add it as needed. That sounds reasonable. Anyone reviewing code, please ensure there's a reason if you're suggesting addition of a trivial die message, particularly if we can figure out how to start printing the actual bash code. Thanks, Donnie -- [EMAIL PROTECTED] mailing list