Am Sonntag, den 08.03.2009, 15:16 -0700 schrieb Donnie Berkholz:
> On 19:27 Sun 08 Mar     , Tiziano Müller wrote:
> > Am Sonntag, den 08.03.2009, 10:01 -0700 schrieb Donnie Berkholz:
> > > It would just eliminate all but one call to use_with(). Depending on how 
> > > many you've got, this can shorten things up a fair bit. Here's an 
> > > example:
> > > 
> > >   econf \
> > >           $(use_with 'x X' 'foo libfoo' 'bar' 'python pygtk')
> > 
> > The above could be rewritten to:
> > 
> > ECONF_USE_WITH="'x X' 'foo libfoo' 'bar' 'python pygtk'"
> > econf $(use_with ${ECONF_USE_WITH})
> 
> Why would I want to obfuscate my code like that by purposely making 
> people look in multiple places to figure out what it's doing? I don't 
> see how this is any improvement.
> 
> > or an eclass could even export this:
> > 
> > src_configure() {
> >     [ -n ${ECONF_USE_WITH} ] && USE_WITH="$(use_with
> > \"${ECONF_USE_WITH}\")"
> >     econf ${USE_WITH}
> > }
> > 
> > Guessing from what I see in the gnome/kde eclasses I think people will
> > implement the above then in eclasses and I therefore don't see why we
> > can't do it like that from the beginning...
> 
> If it can be implemented in an eclass, why would we want to do it as an 
> EAPI in a package manager? Eclasses can be easily changed, you only need 
> to write them once, and you don't have to deal with updating & approving 
> a spec and new implementation for a bug in the previous implementation 
> (which you have to retain indefinitely).

Well, the point I'm trying to make here is a different one:
The syntax you proposed is more to write but still equivalent to the one
using vars.
And looking at the ebuilds - taking G2CONF as an example - it seems that
people don't have a problem with putting their config options into vars.
And furthermore with your syntax you still have to write out "econf
$(use_with ...)" explicitly while adding it the conf-vars to a var (as
proposed) makes the complete src_configure function obsolete, allows the
usage of the default src_configure/src_compile/src_install (see
http://archives.gentoo.org/gentoo-dev/msg_17e6ae8082aeb762fd01ba7307457789.xml 
for example) and is therefore even shorter to write.


Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to