1 |
On Mon, Jan 15, 2018 at 01:34:12PM -0500, Michael Orlitzky wrote: |
2 |
> On 01/14/2018 06:53 PM, Robin H. Johnson wrote: |
3 |
> > +# @ECLASS-VARIABLE: MODULES_OPTIONAL_USE_IUSE_DEFAULT |
4 |
> > +# @DESCRIPTION: |
5 |
> > +# A boolean to control the IUSE default state for the MODULES_OPTIONAL_USE USE |
6 |
> > +# flag. Default value is unset (false). True represented by 1 or 'on', other |
7 |
> > +# values including unset treated as false. |
8 |
> > + |
9 |
> > ... |
10 |
> > + |
11 |
> > +case $MODULES_OPTIONAL_USE_IUSE_DEFAULT in |
12 |
> > + 1) _modules_optional_use_iuse_default='+' ;; |
13 |
> > + *) _modules_optional_use_iuse_default='' ;; |
14 |
> > +esac |
15 |
> |
16 |
> I missed this the first time around, but the case statement needs to |
17 |
> catch "on", too. |
18 |
|
19 |
and possibly all other case combinations of on, so On oN ON also have to |
20 |
be caught, |
21 |
|
22 |
And since you define it as a boolean, you also need to worry about all |
23 |
combinations of true. |
24 |
|
25 |
Honestly what I would do is kill the case completely and use something |
26 |
like this: |
27 |
|
28 |
+if [ -n "${MODULES_OPTIONAL_USE_IUSE_DEFAULT}" ]; then |
29 |
+ _modules_optional_use_iuse_default='+' |
30 |
+fi |
31 |
|
32 |
William |