Re: Incorrect $PATH value for root user

2014-04-10 Thread Jan Stary
On Apr 11 07:55:47, h...@stare.cz wrote:
> On Apr 10 18:48:01, vit...@yandex.ru wrote:
> > Yes, but MacPorts can control this.
> > Instead of specifying "export PATH=/opt/local/bin:/opt/local/sbin:$PATH"
> > in ~/.bash_profile it can (and should) specify it system-wide
> > in /etc/bashrc
> 
> Absolutely not. Don't any program dare touch things in /etc.
> These are to be edited manually, under the assumption that
> you know what you are doing.

Also, the role of ~/.profile and ~/.shrc is not what you think.

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Incorrect $PATH value for root user

2014-04-10 Thread Jan Stary
On Apr 10 18:48:01, vit...@yandex.ru wrote:
> Yes, but MacPorts can control this.
> Instead of specifying "export PATH=/opt/local/bin:/opt/local/sbin:$PATH"
> in ~/.bash_profile it can (and should) specify it system-wide
> in /etc/bashrc

Absolutely not. Don't any program dare touch things in /etc.
These are to be edited manually, under the assumption that
you know what you are doing.

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Incorrect $PATH value for root user

2014-04-10 Thread Brandon Allbery
On Thu, Apr 10, 2014 at 10:50 AM, Chris Jones wrote:

> On 10/04/14 15:48, Помазёнков Виталий wrote:
>
>> Yes, but MacPorts can control this. Instead of specifying "export
>> PATH=/opt/local/bin:/opt/local/sbin:$PATH" in ~/.bash_profile it can
>> (and should) specify it system-wide in /etc/bashrc - in this way there
>> will be no problem with programs which is also installed by Apple like
>> svn - all programs will be the same version (installed by MacPorts).
>>
>
> I for one, (and I am sure others too) do not want MacPorts editing system
> files like /etc/bashrc itself. If you want this, by all means do it
> yourself, but it should remain an action you have to manually have to do,
> if you want it.
>

Strong agreement; this is part of what I meant by it being Apple's. For one
thing, I don't think Apple promises that /etc/bashrc won't be replaced by
an OS upgrade. (Also, seriously don't place path settings in .bashrc /
bashrc, it belongs in .profile / .bash_profile / /etc/profile and things
like rvm / virtualenv / perlbrew etc. will "randomly" lose their settings
if you do it in the per-shell file as it overwrites their changes.)

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Incorrect $PATH value for root user

2014-04-10 Thread Chris Jones

On 10/04/14 15:48, Помазёнков Виталий wrote:

Yes, but MacPorts can control this. Instead of specifying "export
PATH=/opt/local/bin:/opt/local/sbin:$PATH" in ~/.bash_profile it can
(and should) specify it system-wide in /etc/bashrc - in this way there
will be no problem with programs which is also installed by Apple like
svn - all programs will be the same version (installed by MacPorts).


I for one, (and I am sure others too) do not want MacPorts editing 
system files like /etc/bashrc itself. If you want this, by all means do 
it yourself, but it should remain an action you have to manually have to 
do, if you want it.


Chris




# svn --version
svn, version 1.7.10 (r1485443)

$ sudo -i svn --version
svn, version 1.8.8 (r1568071)

--
Виталий

10 апр. 2014 г., в 18:37, Brandon Allbery mailto:allber...@gmail.com>> написал(а):


On Thu, Apr 10, 2014 at 6:39 AM, Помазёнков Виталий mailto:vit...@yandex.ru>> wrote:

Type command sudo -i and fill your password.
Type command echo $PATH.

*Result*


/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/local/bin:/opt/local/sbin


This is sudo's doing (and Apple's insofar as Apple determines both
sudo configuration and how the root account works), because you used
-i. MacPorts can't control either one. Try sudo -s instead; it
preserves your environment.

--
brandon s allbery kf8nh   sine nomine
associates
allber...@gmail.com 
ballb...@sinenomine.net 
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net





___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users



___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Incorrect $PATH value for root user

2014-04-10 Thread Помазёнков Виталий
Yes, but MacPorts can control this. Instead of specifying "export 
PATH=/opt/local/bin:/opt/local/sbin:$PATH" in ~/.bash_profile it can (and 
should) specify it system-wide in /etc/bashrc - in this way there will be no 
problem with programs which is also installed by Apple like svn - all programs 
will be the same version (installed by MacPorts).

# svn --version
svn, version 1.7.10 (r1485443)

$ sudo -i svn --version
svn, version 1.8.8 (r1568071)

--
Виталий

10 апр. 2014 г., в 18:37, Brandon Allbery  написал(а):

> On Thu, Apr 10, 2014 at 6:39 AM, Помазёнков Виталий  wrote:
> Type command sudo -i and fill your password.
> Type command echo $PATH.
> 
> Result
> 
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/local/bin:/opt/local/sbin
> 
> This is sudo's doing (and Apple's insofar as Apple determines both sudo 
> configuration and how the root account works), because you used -i. MacPorts 
> can't control either one. Try sudo -s instead; it preserves your environment.
> 
> -- 
> brandon s allbery kf8nh   sine nomine associates
> allber...@gmail.com  ballb...@sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Incorrect $PATH value for root user

2014-04-10 Thread Brandon Allbery
On Thu, Apr 10, 2014 at 6:39 AM, Помазёнков Виталий wrote:

> Type command sudo -i and fill your password.
> Type command echo $PATH.
>
> *Result*
>
>
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/local/bin:/opt/local/sbin
>

This is sudo's doing (and Apple's insofar as Apple determines both sudo
configuration and how the root account works), because you used -i.
MacPorts can't control either one. Try sudo -s instead; it preserves your
environment.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users