[MacPorts] #20810: postgresql_select port request

MacPorts noreply at macports.org
Fri May 13 06:21:56 PDT 2011


#20810: postgresql_select port request
-------------------------------+--------------------------------------------
 Reporter:  apinstein@…        |       Owner:  mww@…            
     Type:  request            |      Status:  new              
 Priority:  Normal             |   Milestone:                   
Component:  ports              |     Version:                   
 Keywords:                     |        Port:  postgresql_select
-------------------------------+--------------------------------------------

Comment(by apinstein@…):

 Replying to [comment:8 ryandesign@…]:
 > Hmm, it hadn't occurred to me that the existence of a system version of
 something would be a criteria for having a _select port for it. My thought
 process was: There are multiple versions of PostgreSQL available in
 MacPorts that can be installed simultaneously. Users want to type "psql"
 to run a particular one of them. (Or perhaps they want to have scripts
 referencing /opt/local/bin/psql.) The solution I was proposing was to be
 able to "port select" one of them to create the appropriate symlink(s).

 Is that a technical limitation or convention? I would agree with  you from
 the end-user perspective that it shouldn't matter...

 Is there a link somewhere to the docs for _select? I couldn't find
 anything with a quick googling.

 There is also a difference between being able to switch between 2 versions
 but only having one installed and being able to have more than one
 installed at the same time. For instance people would want php 5.2 and 5.3
 installed simultaneously moreso than with postgres, though I imagine that
 for *someone* having both installed at once will always be desirable.

 I'd think that a convention that installs things under versioned prefixes
 and then symlinks to the non-versioned would be nice. Ideal would be
 integrating something like Ruby's bundler which allows you on a per-
 directory basis to control which items mean what. Both solutions are
 probably useful.

 So something like:
 /opt/local/bin/pgsql83
 /opt/local/bin/pgsql84
 /opt/local/bin/pgsql -> /opt/local/bin/pgsql84 [created by select
 postgresql 8.4]

 And then maybe something like:
 in /myproj/foo
 .ports
 == content of .ports ===
 # alias port [version]
 psql postgresql 8.4
 php php52

 And then when you CD into this directory a script would fire that would
 create a local .portsbin folder with appropriate aliases and munge your
 path appropriately as well, like:
 .portsbin/php -> /opt/local/bin/php52
 .portsbin/psql -> /opt/local/bin/psql84
 PATH=/myproj/foo/.portsbin:<existing path>

 That would be boss.

-- 
Ticket URL: <https://trac.macports.org/ticket/20810#comment:10>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list