On sob, 2017-07-08 at 12:26 +0200, Ulrich Mueller wrote:
> > > > > > On Sat, 08 Jul 2017, Michał Górny wrote:
> > The pre-GLEP for review is here:
> > https://wiki.gentoo.org/wiki/User:MGorny/GLEP:ReqUse
> 
> On first glance:
> 
> Section "Processing algorithm":
> 
> > 2. Check whether the REQUIRED_USE constraint matches restrictions
> > set in #Restrictions on REQUIRED_USE format. If it does not, report
> > a REQUIRED_USE mismatch and abort.
> 
> Why is this needed? This case should never occur if the REQUIRED_USE
> syntax doesn't allow it.

The syntax is restricted from the one allowed by the PMS. The algorithm
doesn't cover the weird deep nesting cases. Unless we want to
retroactively change PMS to disallow them as well, the spec needs to
clearly establish the acceptable input for the algorithm presented.

Of course, you are free to omit this step if you implement algorithm
that covers all the PMS-defined cases. However, this goes beyond
the basic scope which this GLEP is concerned about.

> Section "REQUIRED_USE verification algorithm":
> 
> > * An any-of group (||) evaluates to true if at least one of the
> > items in it evaluates to true.
> > * An exactly-one-of group (^^) evaluates to true if exactly one of
> > the items in it evaluates to true, and all the remaining items
> > evaluate to false.
> > * An at-most-one-of group (??) evaluates to true if at most one of
> > the items in it evaluates to true.
> 
> It should be added that any empty group (|| or ^^ or ??) evalutates to
> true, because that's what PMS specifies:
> https://projects.gentoo.org/pms/6/pms.html#x1-780008.2
> 

Indeed you are correct. However, considering what Ciaran wrote it might
be a reasonable alternative to ban them as well. I'm going to wait
a while and see what others say.

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to