Module submission - libmusicbrainz

Auke Kok sofar at foo-projects.org
Sun Apr 16 18:17:08 UTC 2006


Davide "M3xican" Coppola wrote:
> Auke Kok wrote:
>>> A last question, modules files doesn't support conditional dependencies, isn't it?
>>>     
>> it does, the function is called "optional_depends" instead of "depends".
>>   
> Yes, I have used the optional_depends function, but it's not what I meant.
> I mean something like:
> 
> if(IsInstalled(packageA))
> do this...
> else
> ....
> 
> we could use a feature like this to have a code like:
> 
> if(IsInstalled(python))
>     "ctypes is a dependence"
> else
>     "suggest ctypes as optiona dependence"
> 
> And optional_depends doesn't seem to offer this stuff, isn't it?



it does. The problem with your suggestion has been discussed many times before 
and it causes breaking dependencies everywhere, which is why it is not allowed 
either and if []; then; fi statements are banned.

You also code in Python style. That's scary. Please learn bash. Lunar is 
entirely coded in bash.

The syntax for optional depends is:

optional_depends "module" "configure flags when selected" "configure flags 
when not selected" "description

The user can choose NOT to install the optional dependency, even if it is 
installed. The user will always be asked about optional dependencies.

Auke


More information about the Lunar mailing list