[MacPorts] #33768: cherokee shouldn't use negatively-named variants

MacPorts noreply at macports.org
Mon Mar 26 02:31:33 PDT 2012


#33768: cherokee shouldn't use negatively-named variants
-------------------------------------+--------------------------------------
 Reporter:  ryandesign@…             |       Owner:  michael@…              
     Type:  enhancement              |      Status:  new                    
 Priority:  Normal                   |   Milestone:                         
Component:  ports                    |     Version:  2.0.4                  
 Keywords:                           |        Port:  cherokee               
-------------------------------------+--------------------------------------
 cherokee uses many negatively-named variants (no_ipv6, no_pam, no_epoll,
 etc.). Since the release of MacPorts 2.0, negatively-named variants are
 deprecated and should no longer be used.

 In general, variants should only be provided where there's a reasonable
 expectation that a user might want to disable a particular feature. So
 first, decide which, if any, of the existing variants can be removed.

 For the remaining variants, rename any "no_" variants to positively-named
 versions (e.g. ipv6, pam, epoll, etc.); these new variants would then do
 the opposite of what they do now: they would enable the feature in
 question, instead of disable it. Then you use
 [wiki:PortfileRecipes#default_variants default_variants] to turn on by
 default those variants you feel users are likely to want.

 To help users upgrading from the negatively-named variants, the
 negatively-named variants should be retained, as stub variants that merely
 set or unset the positively-named variant; these legacy variants can be
 removed after most users have upgraded; we usually leave them in place for
 one year.

 For example, if you decided it was essential that users be able to disable
 IPv6 functionality, you might have these lines in the Portfile:

 {{{
 configure.args-append --disable-ipv6

 variant ipv6 description {Enable IPv6 support} {
     configure.args-delete --disable-ipv6
     configure.args-append --enable-ipv6
 }

 variant no_ipv6 conflicts ipv6 description {Legacy compatibility variant}
 {}
 if {[variant_isset no_ipv6]} {
     default_variants -ipv6
 } else {
     default_variants +ipv6
 }
 }}}

 Additional variant-related issues you may or may not want to incorporate
 are in #30324.

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


More information about the macports-tickets mailing list