Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Pre-GLEP RFC: Automated enforcing of REQUIRED_USE constraints
Date: Sat, 08 Jul 2017 18:25:20
Message-Id: 1499538305.2661.3.camel@gentoo.org
In Reply to: Re: [gentoo-dev] Pre-GLEP RFC: Automated enforcing of REQUIRED_USE constraints by Ulrich Mueller
1 On sob, 2017-07-08 at 12:26 +0200, Ulrich Mueller wrote:
2 > > > > > > On Sat, 08 Jul 2017, Michał Górny wrote:
3 > > The pre-GLEP for review is here:
4 > > https://wiki.gentoo.org/wiki/User:MGorny/GLEP:ReqUse
5 >
6 > On first glance:
7 >
8 > Section "Processing algorithm":
9 >
10 > > 2. Check whether the REQUIRED_USE constraint matches restrictions
11 > > set in #Restrictions on REQUIRED_USE format. If it does not, report
12 > > a REQUIRED_USE mismatch and abort.
13 >
14 > Why is this needed? This case should never occur if the REQUIRED_USE
15 > syntax doesn't allow it.
16
17 The syntax is restricted from the one allowed by the PMS. The algorithm
18 doesn't cover the weird deep nesting cases. Unless we want to
19 retroactively change PMS to disallow them as well, the spec needs to
20 clearly establish the acceptable input for the algorithm presented.
21
22 Of course, you are free to omit this step if you implement algorithm
23 that covers all the PMS-defined cases. However, this goes beyond
24 the basic scope which this GLEP is concerned about.
25
26 > Section "REQUIRED_USE verification algorithm":
27 >
28 > > * An any-of group (||) evaluates to true if at least one of the
29 > > items in it evaluates to true.
30 > > * An exactly-one-of group (^^) evaluates to true if exactly one of
31 > > the items in it evaluates to true, and all the remaining items
32 > > evaluate to false.
33 > > * An at-most-one-of group (??) evaluates to true if at most one of
34 > > the items in it evaluates to true.
35 >
36 > It should be added that any empty group (|| or ^^ or ??) evalutates to
37 > true, because that's what PMS specifies:
38 > https://projects.gentoo.org/pms/6/pms.html#x1-780008.2
39 >
40
41 Indeed you are correct. However, considering what Ciaran wrote it might
42 be a reasonable alternative to ban them as well. I'm going to wait
43 a while and see what others say.
44
45 --
46 Best regards,
47 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies