On Wed, 12 Aug 2015 17:08:59 +0200 Ulrich Mueller <[email protected]> wrote:
> >>>>> On Wed, 12 Aug 2015, Alexis Ballier wrote: > > > i.e. something that really tells the PM how to automate the choice: > > - 'qt5 -> !qt4' is rather straightforward to solve and tells the PM > > how (note that it is not equivalent to 'qt4 -> !qt5') > > - '^^ ( qt5 qt4 )' requires the PM to make a choice in order to > > automate it > > I was thinking about some syntax like this: > > REQUIRED_USE="|| ( +foo bar ) ^^ ( +qt5 -qt4 )" > > The package manager would first evaluate each group in REQUIRED_USE > with the original set of USE flags. If that doesn't evaluate to true, > retry with flags changed as indicated by the + and - signs. it is more in the line of what we currently do, but that doesn't resolve the 'sat' problem: it doesnt make clear we don't want to satisfy it but rather walk through a list of causes and consequences now that i'm thinking more about it, killing || and ^^ would probably solve the automation problem: qt? ( !qt4? ( qt5 ) qt4? ( !qt5 ) ) vs 'qt? ( ^^ ( qt4 qt5 ) )' a bit longer but PM now knows what to do both are equally expressive: || ( a b ) <-> !a? ( b ) (or !b? ( a ) depending on preference) Here PM will enable b if a is disabled (a if b is disabled in the latter form) ^^ ( a b ) <-> !a? ( b ) a? ( !b ) Here PM will enable b if a is disabled; disable b if a is enabled No need for a new syntax :) Alexis.
