1 |
Donnie Berkholz wrote: |
2 |
> On 10:43 Mon 01 Oct , Alin Năstac wrote: |
3 |
> |
4 |
>> Donnie Berkholz wrote: |
5 |
>> |
6 |
>>> It's better to do something smart than to force interactivity. In this |
7 |
>>> case, you as the maintainer would decide whether this USE combo meant |
8 |
>>> the user wanted virtual-users (if so, forcibly enable one of mysql or |
9 |
>>> postgres), or whether the user definitely did not want to pull in a |
10 |
>>> database (if so, force off virtual-users). |
11 |
>>> |
12 |
>>> |
13 |
>> I cannot force mysql or postgres dependency just because user enabled |
14 |
>> virtual-users flag. |
15 |
>> IMO this case would definitely qualify for a pkg_setup die because |
16 |
>> virtual-users is a local useflag. By selecting virtual-users without |
17 |
>> enabling mysql or postgres storage backend, the user proved to be |
18 |
>> clueless and ebuild should provide the much needed clue. |
19 |
>> |
20 |
> |
21 |
> One way to proceed is to not have both mysql and postgres as USE flags. |
22 |
> Have one as a flag, and have negation of that flag mean to use the |
23 |
> other. Does that make sense for this package, or can they both |
24 |
> reasonably be used at the same time? |
25 |
> |
26 |
> |
27 |
sqlite, mysql and postgres useflags controls the storage backend drivers |
28 |
installed by this package. dspam can be installed with multiple storage |
29 |
drivers, but only one can be active and it is selected through its |
30 |
configuration file. |
31 |
> I strongly discourage dying here; do something smart and log a warning |
32 |
> to the user about it. |
33 |
> |
34 |
okay, how about this code: |
35 |
if use mysql || use postgres; then |
36 |
myconf="${myconf} $(use_enable virtual-users)" |
37 |
else |
38 |
myconf="${myconf} --disable-virtual-users" |
39 |
use virtual-users && ewarn "virtual-users support has been |
40 |
disabled because none of the compatible storage drivers who support that |
41 |
are enabled" |
42 |
fi |