Guide should warn about default_variants
The guide says this about default_variants:
If variants are defined, then the default_variants value lists which variants are enabled by default. This allows for Portfile modularity and also allows users to suppress default variants if they wish.
* Default: none * Example: default_variants +ssl +tcpd
Default variants may be suppressed by preceding a variant name with a "-" as shown in this example.
%% port install foo -ssl
A MacPorts bug makes default_variants inadvisable to use for variants that you might conceivably want to disable. (If, as in the example above, you "port install foo -ssl", foo -ssl is installed. But when you later need to upgrade foo, default_variants +ssl will take precedence and you'll be left with just "foo" (no "-ssl") installed.) Therefore, this section should add a note like this: "The use of default_variants is discouraged. Instead, it's recommend that a port be built such that the most commonly requested functionality is on, and if needed, can be disabled with a "+no_something" variant. To extend the above example, build the port so that ssl and tcpd functionality is on, without needing to select any variant. Provide "no_ssl" and "no_tcpd" variants if there's a good reason someone might want to disable those features."
participants (1)
-
Ryan Schmidt