Opened 16 years ago
Closed 13 years ago
#17150 closed enhancement (duplicate)
add postgresql83 to the system path
Reported by: | dweber@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.6.0 |
Keywords: | path postgresql | Cc: | mww@…, jyrkiwahlstedt, MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
Port: | postgresql83 |
Description
Modify post-destroot to
post-destroot { foreach contrib ${contribs} { system "echo contrib: \"${contrib}\"" system "cd ${worksrcpath}/contrib/${contrib}/ && \ ${destroot.cmd} install ${destroot.destdir} && touch DONE" } system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql83" file delete -force ${destroot}${prefix}/share/doc/${name} \ ${destroot}${prefix}/share/man # Add /opt/local/lib/postgresql83/bin to the system path mkdir ${destroot}/etc/paths.d echo "${prefix}/lib/postgresql83/bin" > ${destroot}/etc/paths.d/postgresql83 }
Change History (8)
comment:1 Changed 16 years ago by blb@…
comment:2 follow-up: 5 Changed 16 years ago by dweber@…
I've been puzzled by the OSX-isms for setting paths (coming from linux background, mainly debian). I suppose this is a larger issue of how or whether macports should modify general system paths. It seems to me, at least, that I like the comfort of knowing postgreSQL is enabled on the system path in this way. Prior to adding this into my local port repository, I only had pgsql set on my user path (likewise all of macports was only setup for my user path, I think).
I agree, at least, there could be a user message on how to enable this on the system path (perhaps a ui_msg that is specific to platform 10.5).
comment:3 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Cc: | mcalhoun@… added |
---|
Cc Me!
comment:4 Changed 16 years ago by (none)
Milestone: | Port Enhancements |
---|
Milestone Port Enhancements deleted
comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to dweber@…:
I agree, at least, there could be a user message on how to enable this on the system path (perhaps a ui_msg that is specific to platform 10.5).
Why make it specific to 10.5? Just print a message telling the user to add /opt/local/lib/postgresql83/bin to their path. The currently-recommended way for MacPorts users to do that is to edit the relevant line in ~/.bash_profile (on any OS version).
I imagine this issue affects all postgresql ports. Then again, other ports that put binaries in strange places, like mysql5 and apache2, do not print messages to the user either. I think we expect the user to know how to use "port contents" to see where things are installed, and to know what the path is and how to change it.
comment:6 Changed 15 years ago by blb@…
Perhaps, once MacPorts 1.8 is finalized, this kind of thing can make use of the new notes field (ticket #421)?
comment:7 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
See also #20810 about adding a postgresql_select port, which is probably the most MacPorts-like solution to the problem.
comment:8 Changed 13 years ago by jmroot (Joshua Root)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duping to #28133 since it has a patch.
Note that /etc/paths.d is a 10.5-ism, and not how MacPorts adds ${prefix}/bin to the PATH. Perhaps just a note in post-activate about the different location?