'No manual entry for port'

Ian Wadham iandw.au at gmail.com
Fri May 3 15:09:33 PDT 2013


On 04/05/2013, at 12:20 AM, Brandon Allbery wrote:
> On Thu, May 2, 2013 at 11:34 PM, Ian Wadham <iandw.au at gmail.com> wrote:
> still are.  In Linux and Unix I would have put such commands in .bashrc
> or, back in the day, .kshrc.
> 
> Nobody cares these days (until they try to use modules/virtualenv/perlbrew/rvm/hsenv and then they complain a lot because their broken setup turns out to be broken, and clearly this is someone else's fault) but you should really NEVER put environment settings into .bashrc/.zshenv/.kshrc($ENV) files. They are read per shell invocation instead of per session and will wipe out any changes made by special sessions, such as those used by environment managers like the ones I named above.

Ah, it all comes back to me now.  Thanks, Brandon.  We were running a mixed
environment of users and developers back then.  Users had standardised .login
and .profile: developers added .kshrc to get a Korn shell development environment.
"bash" had not been invented then.

> I got the impression, too, that .bashrc does not run when you start
> an Apple Terminal window, but only when you manually start a new
> "bash" shell.
> 
> bash does not run .bashrc automatically in a login shell, it assumes you are doing what you need in .profile / .bash_profile. Accordingly, it is common for those to source .bashrc.
> 
> Note that this is a bash-specific behavior; zsh will run .zshenv for login shells, {,t}csh will run .{t,}cshrc for login shells. ksh follows slightly different rules, though (see $ENV).

I guess I should be putting my (present day) developer stuff in .bashrc and
making sure it runs only when required, so as not to cut across anything
Apple, MacPorts or one of the ports may be doing.  Thanks again, Brandon.

Cheers, Ian W.



More information about the macports-users mailing list