1 |
On 10:11 Mon 01 Oct , Alin Năstac wrote: |
2 |
> In this case, $(use mysql || use postgres && use_enable virtual-users) |
3 |
> will result in use_enable virtual-users being executed if and only if |
4 |
> USE="-mysql postgres". See this pseudocode: |
5 |
|
6 |
No .... if use mysql succeeds, || use postgres is skipped entirely and |
7 |
we go straight to the && use_enable. It's considered directly in order |
8 |
with no precedence. |
9 |
|
10 |
To stretch it out: |
11 |
|
12 |
if use mysql; then # skip || use postgres |
13 |
enable virtual-users |
14 |
if ! use mysql; then # run OR: use postgres |
15 |
if use postgres; then |
16 |
enable virtual-users |
17 |
fi |
18 |
fi |
19 |
|
20 |
> if use mysql do nothing |
21 |
> else if use postgres |
22 |
> use_enable virtual |
23 |
> |
24 |
> Wouldn't be best to die in pkg_setup if USE="virtual-users -mysql |
25 |
> -postgres" ? |
26 |
|
27 |
It's better to do something smart than to force interactivity. In this |
28 |
case, you as the maintainer would decide whether this USE combo meant |
29 |
the user wanted virtual-users (if so, forcibly enable one of mysql or |
30 |
postgres), or whether the user definitely did not want to pull in a |
31 |
database (if so, force off virtual-users). |
32 |
|
33 |
Thanks, |
34 |
Donnie |
35 |
-- |
36 |
gentoo-dev@g.o mailing list |