[MacPorts] #19224: BUG: variant_isset does not work on required variants

MacPorts noreply at macports.org
Tue Apr 7 09:45:43 PDT 2009


#19224: BUG: variant_isset does not work on required variants
---------------------------------+------------------------------------------
 Reporter:  raimue@…             |       Owner:  macports-tickets@…                   
     Type:  defect               |      Status:  new                                  
 Priority:  Normal               |   Milestone:  MacPorts Future                      
Component:  base                 |     Version:  1.7.1                                
 Keywords:  variants requires    |        Port:                                       
---------------------------------+------------------------------------------
 If a variant foo requires variant bar, [variant_isset bar] does not return
 true if +foo is selected.

 Test Portfile snippet:
 {{{
 variant foo requires bar {
     ui_msg "Variant foo evaluated!"
 }

 variant bar {
     ui_msg "Variant bar evaluated!"
 }

 build {
     if {[variant_isset foo]} {
         ui_msg "Variant +foo is set!"
     }
     if {[variant_isset bar]} {
         ui_msg "Variant +bar is set!"
     }
 }
 }}}

 Expected result:
 {{{
 Variant bar evaluated!
 Variant foo evaluated!
 ...
 --->  Building testport
 Variant +foo is set!
 Variant +bar is set!
 }}}

 Actual result:
 {{{
 Variant bar evaluated!
 Variant foo evaluated!
 ...
 --->  Building testport
 Variant +foo is set!
 }}}

-- 
Ticket URL: <http://trac.macports.org/ticket/19224>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list