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

Chris Jones jonesc at hep.phy.cam.ac.uk
Thu Feb 2 09:17:54 UTC 2017



On 01/02/17 17:23, Barry Scott wrote:
>
>> On 1 Feb 2017, at 14:20, Bachsau <web at bachsau.name
>> <mailto: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.

This is something I think the Macports installer should do, have a 
dedicated 'page' in the installer that explains why this is needed, 
defaults to enabling it, but offers the option to opt out if the users 
wants.

Chris

>
>>
>>> 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
>


More information about the macports-users mailing list