Prevent MacPorts editing .bash_profile over and over again...

Jan Stary hans at
Tue Mar 21 13:30:45 UTC 2017

On Jan 28 16:31:12, barry at wrote:
> I want to be able to stop MacPorts Installation from editing my .bash_profile.
> As it happens I already set all the env var that are needed my self.

On Feb 01 00:38:03, ryandesign at wrote:
> > Nothing should change my .bash_profile without asking back.
> > It is something that malware usually does.
> The MacPorts installer has always done this. I'm pretty sure it tells you it will do this, and our documentation says so too. The alternative is that the user installs MacPorts, then when they try to use it they get an error that "port" could not be found in the path.

The same error is there now.
After a fresh install of 2.4.1 yesterday,
'port' is not found, because /opt/local/bin is not in my PATH.
The installer has written the PATH=... bit into my ~/.profile,
but that does not mean it is the PATH of the shell I am already running.
It will be, after I start a new shell, or re-login.

> this will cause tons of support requests that I would prefer to avoid, so I'd like to keep things the way they are, with the installer modifying the user's profile when needed.

I appreciate you concern about being spammed with trivia.
But it's one line in ~/.profile, which is equally trivial.
I find mangling the user's shell configuration worse:
someone who uses macports to install software
is capable of editing one line in their config if told so.

We can trade all this for a sentence that says
"add /opt/local/bin to your $PATH". In fact,
the documentation already says so for EDITOR.
How is this different?

On Feb 01 15:20:26, web at wrote:
> Not only repeated modifications.
> It simply should not do that in any case.


I will try to come up with a diff tonight.


More information about the macports-users mailing list