[Exherbo-dev] Proposal for "option restrictions" syntax

Bernd Steinhauser exherbo at bernd-steinhauser.de
Tue Sep 16 14:29:43 BST 2008


Bo Ørsted Andresen wrote:
> On Wednesday 13 August 2008 23:03:21 Ciaran McCreesh wrote:
>> Possibly something like:
>>
>>     ( foo bar baz ) [[ number-selected = exactly-one ]]
>>     ( monkey ) [[ requires = [ animals bananas ] ]]
> 
> So taking xorg-server as an example this would become:
> 
> MYOPTIONS+="
>     ( kdrive platform:x86 video_driver:ati )           [[ requires = [ video_driver:fbdev video_driver:vesa ] ]]
>     ( kdrive platform:x86 video_driver:sis )           [[ requires = [ video_driver:fbdev video_driver:vesa ] ]]
>     ( kdrive platform:x86 video_driver:siliconmotion ) [[ requires = [ video_driver:fbdev video_driver:vesa ] ]]
>  
>     ( kdrive platform:x86 video_driver:chips )         [[ requires = [ video_driver:vesa ] ]]
>     ( kdrive platform:x86 video_driver:glint )         [[ requires = [ video_driver:vesa ] ]]
>     ( kdrive platform:x86 video_driver:mach64 )        [[ requires = [ video_driver:vesa ] ]]
>     ( kdrive platform:x86 video_driver:mga )           [[ requires = [ video_driver:vesa ] ]]
>     ( kdrive platform:x86 video_driver:neomagic )      [[ requires = [ video_driver:vesa ] ]]
>     ( kdrive platform:x86 video_driver:nv )            [[ requires = [ video_driver:vesa ] ]]
>     ( kdrive platform:x86 video_driver:r128 )          [[ requires = [ video_driver:vesa ] ]]
>     ( kdrive platform:x86 video_driver:via )           [[ requires = [ video_driver:vesa ] ]]
>  
>     ( kdrive-vesa ) [[ requires = [ kdrive ] ]]
>     ( xephyr )      [[ requires = [ kdrive ] ]]
>     ( xfake )       [[ requires = [ kdrive ] ]]
>     ( xfbdev )      [[ requires = [ kdrive ] ]]
>     ( xsdl )        [[ requires = [ kdrive ] ]]
> "
Wouldn't it be possible to simplify that a bit. For example
MYOPTIONS+="
     (
         (
             kdrive & platform:x86 & video_driver:ati
             kdrive & platform:x86 & video_driver:sis
             kdrive & platform:x86 & video_driver:siliconmotion
         ) [[ requires = [ video_driver:fbdev ] ]]
         kdrive & platform:x86 & video_driver:chips
[...]
         kdrive & platform:x86 & video_driver:via
     ) [[ requires = [ video_driver:vesa ] ]]
"

Plus, I don't really like defining that in MYOPTIONS, because it makes 
it harder to see which options are defined and which are missing and 
moving it to DEPENDENCIES would allow grouped opition definitions, like 
platform:(amd64,x86) or video_driver:(ati,sis,siliconmotion) etc. which 
makes it much more readable, in my opinion. (It shouldn't be a problem 
to use that exact syntax in DEPENDENCIES.)



More information about the Exherbo-dev mailing list