Ticket #14178 (closed enhancement: fixed)
show default_variants in "port variants foobar"
| Reported by: | themolok@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | MacPorts 1.8.0 |
| Component: | base | Version: | 1.6.0 |
| Keywords: | Cc: | themolok@…, ryandesign@…, jan.matousek@…, raimue@… | |
| Port: |
Description
I tried to write a patch for it, but I failed (I never wrote a single line of tcl, and I'm a pretty lame programmer), anyway, I think it's really trivial for who knows the port (the tcl script) codebase.
Now, for example, "port variants git-core" returns (note that doc is in default_variants):
git-core has the variants:
universal
doc: Install HTML and plaintext documentation
svn: Bi-directional subversion repository support
I'd like to have something like:
git-core has the variants:
universal
doc: Install HTML and plaintext documentation (default)
svn: Bi-directional subversion repository support
Change History
comment:2 Changed 5 years ago by ryandesign@…
- Cc ryandesign@… added
- Summary changed from Feature Request: show default_variants in "port variants foobar" to show default_variants in "port variants foobar"
- Milestone changed from MacPorts base bugs to MacPorts base enhancements
This request just came up on the mailing list too.
I've been manually adding "(default)" after all of my variant descriptions, but clearly it would be better if base did this automatically.
comment:4 Changed 5 years ago by michele.cella@…
+1
I was looking for the same thing today.
UI wise I think showing a plus sign besides default variants it's the best thing as you don't need to scan to the end of the variant description to search for "(default)" and it's coherent with the mechanism you use to invoke non default variants or negating them.
That's what I would expect:
git-core has the variants:
universal
+doc: Install HTML and plaintext documentation
svn: Bi-directional subversion repository support
comment:5 Changed 5 years ago by jmr@…
- Milestone changed from MacPorts base enhancements to MacPorts 1.8.0
comment:7 Changed 5 years ago by raimue@…
- Cc raimue@… added
I began to use some special syntax in port info to indicate the reason for this variant to be selected. Currently port adds prefixes to variants for three different cases:
- + explicitely selected on the command-line
- [+] selected by default_variants
- (+) selected by variants.conf
I haven't heard any feedback so far on this, especially if you got better ideas how to indicate this. But at last it would be good to use the same syntax in port variants.
comment:8 Changed 5 years ago by perry@…
Sounds good; for the sake of consistency they should be the same. I'll go ahead and change the syntax to [+] in trunk.
comment:10 Changed 4 years ago by perry@…
- Status changed from new to closed
- Resolution set to fixed
Cleaned up the code in r45034.

