Ticket #30328 (new enhancement)
Enable variants for specific ports in variants.conf
|Reported by:||ionic@…||Owned by:||macports-tickets@…|
Currently, variants.conf only provides the possibility to globally enable or disable variants.
I'm proposing a feature letting users define port specific variants in this file too, similar to Gentoo's package.use or use.conf file(s), though not necessarily as sophisticated.
Basically it would be really nice to turn variants on and off in the variants.conf file for specific ports and globally, without fiddling with them on the command line.
Thus, I propose following syntax:
portname +variant1 -variant2 +variant3 +variant4 -variant5
Or, if that's more convenient,
portname variant1 -variant2 variant3 variant4 -variant5
We can retain the global variants definition by using the virtual portname "all", as in
The upgrade option --enforce-variants SHOULD check for changed variants definitions and rebuild packages accordingly. Without specifying it, upgrade SHOULD NOT rebuild packages because of variants changes only.
However, is a port is already outdated, the upgrade command SHOULD update the specific port using the variants defined in there, but MUST NOT use the variants defined when previously installed.
Once this is in place, we COULD drop specifying variants on the command line. Retaining the functionality is fine too, but if so, global variants, package specific variants and variants defined on the command line SHOULD be merged and "variant conflicts" "resolved", with this priority:
cmdline >> specific >> global
I guess the current behavior is cmdline >> global, so specific variants would come between this and override any globally set variants.