On 10:11 Mon 01 Oct , Alin Năstac wrote:
> In this case, $(use mysql || use postgres && use_enable virtual-users)
> will result in use_enable virtual-users being executed if and only if
> USE="-mysql postgres". See this pseudocode:
No .... if use mysql succeeds, || use postgres is skipped entirely and
we go straight to the && use_enable. It's considered directly in order
with no precedence.
To stretch it out:
if use mysql; then # skip || use postgres
enable virtual-users
if ! use mysql; then # run OR: use postgres
if use postgres; then
enable virtual-users
fi
fi
> if use mysql do nothing
> else if use postgres
> use_enable virtual
>
> Wouldn't be best to die in pkg_setup if USE="virtual-users -mysql
> -postgres" ?
It's better to do something smart than to force interactivity. In this
case, you as the maintainer would decide whether this USE combo meant
the user wanted virtual-users (if so, forcibly enable one of mysql or
postgres), or whether the user definitely did not want to pull in a
database (if so, force off virtual-users).
Thanks,
Donnie
--
[EMAIL PROTECTED] mailing list