Opened 16 years ago

Closed 15 years ago

#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 (Ryan Carsten Schmidt), jan.matousek@…, raimue (Rainer Müller)
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 (10)

comment:1 Changed 16 years ago by jmpp@…

Milestone: MacPorts base bugs

comment:2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Milestone: MacPorts base bugsMacPorts base enhancements
Summary: Feature Request: show default_variants in "port variants foobar"show default_variants in "port variants foobar"

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:3 Changed 16 years ago by jan.matousek@…

Cc: jan.matousek@… added

Cc Me!

comment:4 Changed 16 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 15 years ago by jmroot (Joshua Root)

Milestone: MacPorts base enhancementsMacPorts 1.8.0

comment:6 Changed 15 years ago by lperry (Perry Lee)

I addressed this in Ticket #15628 (r43475).

comment:7 Changed 15 years ago by raimue (Rainer Müller)

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 15 years ago by lperry (Perry Lee)

Sounds good; for the sake of consistency they should be the same. I'll go ahead and change the syntax to [+] in trunk.

comment:9 Changed 15 years ago by lperry (Perry Lee)

Syntax was changed in r44058.

comment:10 Changed 15 years ago by lperry (Perry Lee)

Resolution: fixed
Status: newclosed

Cleaned up the code in r45034.

Note: See TracTickets for help on using tickets.