Ticket #14141 (closed defect: fixed)
Guide should say what characters are valid in variant names
| Reported by: | ryandesign@… | Owned by: | markd@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | guide | Version: | 1.6.0 |
| Keywords: | Cc: | ||
| Port: |
Description
Variant names may not contain a hyphen. (For example: "variant no-x11" would be wrong.) Underscores should be used instead (e.g. "variant no_x11"). The guide should mention this in the section on writing portfiles.
Change History
comment:2 Changed 5 years ago by ryandesign@…
- Status changed from closed to reopened
- Resolution fixed deleted
- Summary changed from Variant names cannot contain hyphens; guide should mention this to Guide should say what characters are valid in variant names
Thanks for your quick response!
But actually, rather than just mention that the hyphen is invalid, let's mention what is valid. All our ports' variant names right now use just the letters A-Z and a-z, numbers 0-9 and the underscore, so I think that's the list of valid characters we should publish in the guide. It's still worth mentioning specifically that the hyphen is invalid, since people seem to want to use that, and a handful of ports' variant names still use the hyphen; I'll work with those port maintainers to remove those.
Related: port lint should warn on illegal variant names; see #14147.


I made modifications in #33664, #33665, and #33666. I'm closing the ticket, but feel free to critique the mods and reopen to make further suggestions if you like. There is always room for improvement. Thanks for catching this!