From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E2C65138CA2 for ; Thu, 23 Apr 2015 18:21:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8725FE0A7F; Thu, 23 Apr 2015 18:21:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EB7B4E0A7E for ; Thu, 23 Apr 2015 18:21:12 +0000 (UTC) Received: from [10.0.31.145] (unknown [100.42.98.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 256B43409EF for ; Thu, 23 Apr 2015 18:21:12 +0000 (UTC) Message-ID: <55393815.7050109@gentoo.org> Date: Thu, 23 Apr 2015 11:21:09 -0700 From: Zac Medico User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] portage/util.py: Identify the source of a "bad sustitution" error message (bug 542796) References: <1429804901-13114-1-git-send-email-dolsen@gentoo.org> <55392E10.5030809@gentoo.org> <20150423110825.58ad7e90.dolsen@gentoo.org> In-Reply-To: <20150423110825.58ad7e90.dolsen@gentoo.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Archives-Salt: 99d5027f-fd90-4f7e-900d-ce84ed534e8e X-Archives-Hash: 11a3db34c5634e67de770d59880df027 On 04/23/2015 11:08 AM, Brian Dolbec wrote: > On Thu, 23 Apr 2015 10:38:24 -0700 > Zac Medico wrote: > >> On 04/23/2015 09:01 AM, Brian Dolbec wrote: >>> This bug caused great difficulty in determining the cause of the >>> error message. This adds identifying code which states where the >>> error message is coming from. It also adds the actual source which >>> caused the error message in the first place. X-Gentoo-Bug: 542796 >>> X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=542796 >>> X-Gentoo-forum-thread: >>> https://forums.gentoo.org/viewtopic-t-1014842.html >> >> Since varexpand already has an error_leader argument, we could use >> that to report the source. The relevant varexpand calls are in >> pym/portage/util/_dyn_libs/LinkageMapELF.py, added in commit >> f1c1b8a77eebf7713b32e5f9945690f60f4f46de. > > > Yes, that is a good idea. Should we do similar for all varexpand calls? Sure. Most varexpand calls are via portage.util.getconfig, which already passes in the error_leader parameter. There are a small number of varexpand calls elsewhere which aren't using the error_leader parameter yet. > Also, That is in addition to identifying that the message is being > generated in portage.util varexpand()? So we don't keep looking for > the problem/source in the wrong place like we just did? I think it's enough to use the error_leader parameter, since generally that should give enough information to isolate the source of the problem. -- Thanks, Zac