[MacPorts] #19224: BUG: variant_isset does not work on required variants
#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
#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: ---------------------------------+------------------------------------------ Comment(by perry@…): I've attached a patch that seems to fix the bug. Any thoughts? I'm not sure if I added the logic to the correct place. -- Ticket URL: <http://trac.macports.org/ticket/19224#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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: ---------------------------------+------------------------------------------ Comment(by perry@…): Example Run: {{{ perry@phoenix_lan ~/src/lports/devel/foo % port variants Thu Oct 22 22:40:57 foo has the variants: bar * requires baz baz foo * requires bar perry@phoenix_lan ~/src/lports/devel/foo % sudo port build +foo Thu Oct 22 22:41:00 Warning: foo has no universal variant Variant baz evaluated! Variant bar evaluated! Variant foo evaluated! ---> Computing dependencies for foo ---> Fetching foo ---> Verifying checksum(s) for foo ---> Extracting foo ---> Configuring foo ---> Building foo Variant +foo is set! Variant +bar is set! Variant +baz is set! perry@phoenix_lan ~/src/lports/devel/foo % sudo port clean Thu Oct 22 22:41:14 Warning: foo has no universal variant ---> Cleaning foo perry@phoenix_lan ~/src/lports/devel/foo % sudo port build +bar Thu Oct 22 22:41:39 Warning: foo has no universal variant Variant baz evaluated! Variant bar evaluated! ---> Computing dependencies for foo ---> Fetching foo ---> Verifying checksum(s) for foo ---> Extracting foo ---> Configuring foo ---> Building foo Variant +bar is set! Variant +baz is set! }}} -- Ticket URL: <http://trac.macports.org/ticket/19224#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#19224: BUG: variant_isset does not work on required variants ----------------------------------+----------------------------------------- Reporter: raimue@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts 1.9.0 Component: base | Version: 1.7.1 Resolution: fixed | Keywords: variants requires Port: | ----------------------------------+----------------------------------------- Changes (by jmr@…): * status: new => closed * resolution: => fixed * milestone: MacPorts Future => MacPorts 1.9.0 Comment: r66642 -- Ticket URL: <http://trac.macports.org/ticket/19224#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts