From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Ks2dv-0002nS-AL for garchives@archives.gentoo.org; Mon, 20 Oct 2008 21:50:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 83015E02C9; Mon, 20 Oct 2008 21:50:24 +0000 (UTC) Received: from nameserver1.mcve.com (nameserver1.mcve.com [216.155.111.1]) by pigeon.gentoo.org (Postfix) with ESMTP id 51D29E02C9 for ; Mon, 20 Oct 2008 21:50:24 +0000 (UTC) Received: from [192.168.11.55] (shop.monetra.com [216.155.111.10]) by nameserver1.mcve.com (Postfix) with ESMTP id 4C5B411181D0 for ; Mon, 20 Oct 2008 17:50:22 -0400 (EDT) Message-ID: <48FCFD1D.4010302@gentoo.org> Date: Mon, 20 Oct 2008 17:50:21 -0400 From: Doug Goldstein User-Agent: Thunderbird 2.0.0.17 (X11/20080930) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] virtualx eclass References: <48F74557.30906@gentoo.org> <48F75F30.7030408@gentoo.org> In-Reply-To: <48F75F30.7030408@gentoo.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 7f8c9c73-0535-4720-9a21-ad6f108063c1 X-Archives-Hash: 72f8e291331ee9b570b389f8f892e5ad Doug Goldstein wrote: > Doug Goldstein wrote: > >> While the rule of thumb has been if an eclass needs something it should >> provide it's own depends. However the virtualx eclass needs to be >> different simply because in some cases it's only uses for tests (this is >> it's most common usage in the whole) tree. When it's used for tests >> pulling in the xorg-server the most ideal situation would be if >> xorg-server was only pulled in on USE=test because currently for anyone >> emerging an app that uses GTK+ they have a weird situation in the fact >> that all of GTK+'s depends that have USE=X use it to mean libX11 (as do >> most usages of the X USE flag), however GTK+ itself due to it's usage of >> the virtualx eclass pulls in xorg-server when USE=X, which is only used >> for tests. This results in a confusing experience for users looking to >> built a headless machine. >> >> It'd be a lot more consistent if ebuilds provided a USE flag or directly >> depended on the xorg-server and then used the functions in the eclass. >> So in summary, those are the changes I plan on making very shortly. If >> someone's got some input, please speak up. >> >> >> > Alright... after talking to Diego, Dave, and Remi the final result that > I've come up with is the following: > > VIRTUALX_CONDITIONAL_USE="test" > > inherit virtualx > > That'll result in virtualx adding the following: > > DEPEND="test? ( x11-base/xorg-server x11-apps/xhost )" > > if VIRTUALX_CONDITIONAL_USE is unset (as it will be for all ebuilds > initially) the default will be "X". Which means the default is the same > as what we've got today. If it's set to an empty string, it'll always be > required. Otherwise, it will use the supplied USE flag. > > Turns out this situation breaks down when multiple USE flags are required/used. One suggestion is to allow for that via: VIRTUALX_CONDITIONAL_USE="test X" but needs someone to write some elegant shell to make that expansion happen. Also, it'll happen in the global scope when the data is cached so a little ugh on that part. The last fall back of course is to go to just defining VIRTUALX_DEPS and letting each ebuild USE it how it needs to use it. Feedback, comments, etc are appreciated. -- Doug Goldstein