On Sun, Aug 30, 2009 at 07:06:02PM +0200, Mounir Lamouri wrote:
> Hi,
<snip>
> However, dying is probably not the best solution too.
> So I think we should add a new feature in PMS already used in Exherbo
> EAPI, USE flags requirements [1]. That means an ebuild should be able to
> say a USE flag is available only if some other ones are in a specific state.
> Let's take the mplayer example, if we have a line like this:
> USE_REQUIREMENTS="encode? ( mp2 mp3 faac x264 xvid )", PM should be able
> to show the user USE="mp3" will be ignored because he didn't set
> USE="encode" and the PM will disable this USE flag by himself.
> The same way, for ekiga:
> USE_REQUIREMENTS="kde? ( kontact )", PM should be able to show the user
> if he set USE="kontact", kde USE flag is enabled and the PM will enable
> this USE flag by himself.

I'm not sure acting as if the user didn't enable the USE flag is the best
option. If I manually enable the bar USE-flag I might not expect there to be an
issue and not notice that it has been silently ignored. In general I think we
should take the approach that if we can't give a user what he/she asked for we
should error out and tell him/her that there was a problem and that
such-and-such needs to be changed.

> I'm not writing a GLEP draft so don't try to found an issue in the
> syntax used, it's only to know if this kind of feature will be
> appreciated by other users/devs than me and if it could be added to
> EAPI-4 and worth to work on it.
> I can write the GLEP and implement the feature in portage.

I very much would like this feature. I've been using it in Exherbo and it's
quite useful so far. Only thing is that it'll be possible to do this sort of
thing(only you'll have to || die) with EAPI-3 as a 'if use foo; then use bar
|| die "foo needs bar"'. The question is whether it is worth it to have this
special construct for USE-flag combinations(there're far more possibilities than
the one I gave), and I'd say it is worth it.
> 
> [1] http://www.exherbo.org/docs/exheres-for-smarties.html#myoptions
> 
> Thanks,
> Mounir
> 

Regards,
Thomas
-- 
---------
Thomas Anderson
Gentoo Developer
/////////
Areas of responsibility:
AMD64, Secretary to the Gentoo Council
---------

Attachment: pgpC6dfSRDZwM.pgp
Description: PGP signature

Reply via email to