[MacPorts] #36179: Please add port select --summary option
#36179: Please add port select --summary option ------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: ------------------------------+-------------------------------- I love how easy it is with port select to switch between versions. But finding out which of the ports I have installed support port select is tricky. I have to google to find http://stackoverflow.com/questions/8016692/on- macports-what-ports-are-supported-by-port-select and then I see {{{ $ ls /opt/local/etc/select clang cython gcc ipython llvm mysql nosetests pep8 python qt4 scala sphinx $ port select --show gcc The currently selected version for 'gcc' is 'mp-gcc47'. $ port select --show python The currently selected version for 'python' is 'python27'. }}} Would it be possible to have one command (e.g. called --summary) that shows an overview table: {{{ $ port select --summary Portgroup Selected Options gcc mp-gcc47 none llvm-gcc42 mp-gcc45 mp-gcc47 mp-llvm-gcc42 python python27 none python27 python32 ... }}} -- Ticket URL: <https://trac.macports.org/ticket/36179> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36179: Please add port select --summary option -------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.2 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Changes (by ryandesign@…): * component: ports => base Comment: To see the select ports that you've already installed, run: {{{ port installed name:_select$ }}} To see the available select ports that you haven't installed yet, run: {{{ port echo name:_select$ and not installed }}} -- Ticket URL: <https://trac.macports.org/ticket/36179#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36179: Please add port select --summary option -------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.2 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Changes (by cal@…): * cc: cal@… (added) Comment: If you know some Tcl (or even if you don't, since it's not too complicated) I'd welcome a patch on this one. To start, see source:trunk/base/src/macports1.0/macports.tcl@97839:3986-4094#L3986 where this is implemented. -- Ticket URL: <https://trac.macports.org/ticket/36179#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36179: Please add port select --summary option -------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.2 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by devshashwatpandey@…): I have added the --summary option for port select. But, I could not test it properly. Please report any bugs. -- Ticket URL: <https://trac.macports.org/ticket/36179#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#36179: Please add port select --summary option -------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.2 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by cal@…): Looks good at first sight – unfortunately I can't test right now because my working copy is busy tracking other changes and I don't want to risk mix them (why don't we use git again? :/). One thing I noticed is that your changes put `set group [lindex $portlist 0]` before the length check of `$portlist`. Since `lindex` doesn't fail on invalid indices that's not a problem per-se, I just think it would be a little cleaner to move it after the check. The indentation seems to be a little off in some places, too, but that's just a cosmetic issue. Everything else seems to be in order – what's the problem with testing it? Don't have any select-capable ports installed? You can just install `python_select` or `mysql_select` – they won't have anything to select, but they should still show up just fine in your summary output. -- Ticket URL: <https://trac.macports.org/ticket/36179#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#36179: Please add port select --summary option -------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.2 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by snc@…): Replying to [comment:1 ryandesign@…]: You can combine those ideas to get the requested feature: {{{ for i in `port -q echo installed and name:_select$`; do port select --list ${i%%_select*}; done }}} -- Ticket URL: <https://trac.macports.org/ticket/36179#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#36179: Please add port select --summary option -------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.2 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by snc@…): I've fixed a bug, and rearranged the code to make a cleaner diff. Please see attached. -- Ticket URL: <https://trac.macports.org/ticket/36179#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#36179: Please add port select --summary option -------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: Component: base | Version: 2.1.2 Resolution: fixed | Keywords: Port: | -------------------------------+-------------------------------- Changes (by snc@…): * status: new => closed * resolution: => fixed Comment: Added in r117607. Thanks! -- Ticket URL: <https://trac.macports.org/ticket/36179#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts