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 1Kcd5O-0003Uu-6Z for garchives@archives.gentoo.org; Mon, 08 Sep 2008 09:31:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E7B2E033F; Mon, 8 Sep 2008 09:31:05 +0000 (UTC) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.226]) by pigeon.gentoo.org (Postfix) with ESMTP id 4D972E033F for ; Mon, 8 Sep 2008 09:31:05 +0000 (UTC) Received: by wx-out-0506.google.com with SMTP id h31so99646wxd.10 for ; Mon, 08 Sep 2008 02:31:04 -0700 (PDT) Received: by 10.70.42.16 with SMTP id p16mr18831269wxp.78.1220866264140; Mon, 08 Sep 2008 02:31:04 -0700 (PDT) Received: by 10.70.40.7 with HTTP; Mon, 8 Sep 2008 02:31:04 -0700 (PDT) Message-ID: Date: Mon, 8 Sep 2008 02:31:04 -0700 From: "Alec Warner" Sender: antarus@scriptkitty.com To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [RFC] Ability to pass arguments to src_configure/src_compile In-Reply-To: <3c32af40809080158o3b63e23eg45b64ee574e44530@mail.gmail.com> 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c32af40809080158o3b63e23eg45b64ee574e44530@mail.gmail.com> X-Google-Sender-Auth: 3d9d5d534747c483 X-Archives-Salt: 074b9fdb-847f-40e6-bea9-5e1629b457e8 X-Archives-Hash: 2321a90a7256226d6576725727f22c33 On Mon, Sep 8, 2008 at 1:58 AM, Santiago M. Mola wrote: > On Mon, Sep 8, 2008 at 10:44 AM, Alec Warner wrote: >> >> Most obvious failure cases these days have build logs and the build >> logs will specify what the configure command >> was, so the only problematic area is looking at the ebuild to >> determine what will happen during execution. Arguably having >> an ebuildshell would assist here. However, ebuilds are already >> sufficiently complicated by eclass inheritance that reading >> many ebuilds is already difficult and I think this extension does not >> make that significantly worse. > > If you're just dealing with the default phases, it's not too hard to > say in advance the exact command that will be executed. Default phases > are well-defined in PMS. So you can look at them to see what will > happend if you define some variable. The point is that it is not in the ebuild; you need to look it up...unless you have all the default functions memorized? :) > > For example, for the proposed arguments for src_configure, a > definition would be something like this (taken from Exherbo, just > pretend it says USE instead OPTION and you're done): > default_src_configure() > { > if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then > econf \ > "${DEFAULT_SRC_CONFIGURE_PARAMS[@]}" \ > $(for s in "${DEFAULT_SRC_CONFIGURE_OPTION_ENABLES}" ; do \ > option_enable ${s} ; \ > done ) \ > $(for s in "${DEFAULT_SRC_CONFIGURE_OPTION_WITHS}" ; do \ > option_with ${s} ; \ > done ) > fi > } > > It's quite straightforward. > > Regards, > -- > Santiago M. Mola > Jabber ID: cooldwind@gmail.com > >