Donnie Berkholz wrote:
> On 10:43 Mon 01 Oct     , Alin Năstac wrote:
>   
>> Donnie Berkholz wrote:
>>     
>>> 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.
>>     
>
> One way to proceed is to not have both mysql and postgres as USE flags. 
> Have one as a flag, and have negation of that flag mean to use the 
> other. Does that make sense for this package, or can they both 
> reasonably be used at the same time?
>
>   
sqlite, mysql and postgres useflags controls the storage backend drivers
installed by this package. dspam can be installed with multiple storage
drivers, but only one can be active and it is selected through its
configuration file.
> I strongly discourage dying here; do something smart and log a warning 
> to the user about it.
>   
okay, how about this code:
       if use mysql || use postgres; then
          myconf="${myconf} $(use_enable virtual-users)"
       else
          myconf="${myconf} --disable-virtual-users"
          use virtual-users && ewarn "virtual-users support has been
disabled because none of the compatible storage drivers who support that
are enabled"
       fi


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to