Donnie Berkholz wrote: > 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. > > You're right again. :-[ >> 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). > I cannot force mysql or postgres dependency just because user enabled virtual-users flag. IMO this case would definitely qualify for a pkg_setup die because virtual-users is a local useflag. By selecting virtual-users without enabling mysql or postgres storage backend, the user proved to be clueless and ebuild should provide the much needed clue.
signature.asc
Description: OpenPGP digital signature