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

Barry Scott barry at barrys-emacs.org
Wed Feb 1 17:23:20 UTC 2017


> On 1 Feb 2017, at 14:20, Bachsau <web at bachsau.name> wrote:
> 
> Am 01.02.2017 um 07:38 schrieb Ryan Schmidt:
>> Sorry. Repeated modifications of the profile when the modifications were already there was a bug. It looks like a fix was committed, so hopefully 2.4.1 will not have this bug anymore.
> 
> Not only repeated modifications. It simply should not do that in any case, without asking back! 

It is not uncommon to have your profile modified. The python.org <http://python.org/> installer will do this.
But in that case there is a Customise button that allows you to turn this off.

> 
>> Using /etc/paths to add the MacPorts paths is not recommended because that appends the MacPorts paths to the default, while we want the MacPorts paths to be prepended. We want MacPorts versions of software to supersede probably older versions provided by the OS, not vice versa as using /etc/paths will do.
> 
> It depends on the order in your /etc/paths. If I put it first, it is first. The advantage of /etc/paths is it is applied even to the graphical environment, not just when running a login shell.

The fix that I contributed fixed the bug and will in fact take into account your edits to /etc/paths as there terminal will start with PATH set to this.

> 
>> The MacPorts installer has always done this. I'm pretty sure it tells you it will do this, and our documentation says so too.
> 
> It did not, never.

> 
>> 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; 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.
> 
> People using MacPorts are those who know about the insides of their system and want to customize it. I think they should at least be able to read and follow documentation.
> 

I don’t think its safe to assume all MacPorts uses are expert admins.

Barry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20170201/4cbadac6/attachment.html>


More information about the macports-users mailing list