Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] portage/util.py: Identify the source of a "bad sustitution" error message (bug 542796)
Date: Thu, 23 Apr 2015 18:21:17
Message-Id: 55393815.7050109@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] portage/util.py: Identify the source of a "bad sustitution" error message (bug 542796) by Brian Dolbec
1 On 04/23/2015 11:08 AM, Brian Dolbec wrote:
2 > On Thu, 23 Apr 2015 10:38:24 -0700
3 > Zac Medico <zmedico@g.o> wrote:
4 >
5 >> On 04/23/2015 09:01 AM, Brian Dolbec wrote:
6 >>> This bug caused great difficulty in determining the cause of the
7 >>> error message. This adds identifying code which states where the
8 >>> error message is coming from. It also adds the actual source which
9 >>> caused the error message in the first place. X-Gentoo-Bug: 542796
10 >>> X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=542796
11 >>> X-Gentoo-forum-thread:
12 >>> https://forums.gentoo.org/viewtopic-t-1014842.html
13 >>
14 >> Since varexpand already has an error_leader argument, we could use
15 >> that to report the source. The relevant varexpand calls are in
16 >> pym/portage/util/_dyn_libs/LinkageMapELF.py, added in commit
17 >> f1c1b8a77eebf7713b32e5f9945690f60f4f46de.
18 >
19 >
20 > Yes, that is a good idea. Should we do similar for all varexpand calls?
21
22 Sure. Most varexpand calls are via portage.util.getconfig, which already
23 passes in the error_leader parameter. There are a small number of
24 varexpand calls elsewhere which aren't using the error_leader parameter yet.
25
26 > Also, That is in addition to identifying that the message is being
27 > generated in portage.util varexpand()? So we don't keep looking for
28 > the problem/source in the wrong place like we just did?
29
30 I think it's enough to use the error_leader parameter, since generally
31 that should give enough information to isolate the source of the problem.
32 --
33 Thanks,
34 Zac