#10822: sage -sh doesn't set the path right if default shell is zsh on OSX
-------------------------------------+-------------------------------------
       Reporter:  jason              |        Owner:
           Type:  defect             |       Status:  closed
       Priority:  major              |    Milestone:  sage-5.0.1
      Component:  scripts            |   Resolution:  fixed
       Keywords:  sd40.5             |    Merged in:  sage-5.0.1.rc1
        Authors:  John Palmieri,     |    Reviewers:  Ivan Andrus, Jeroen
  Jason Grout                        |  Demeyer, Punarbasu Purkayastha
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
   Dependencies:  #11866, #11790     |     Stopgaps:
-------------------------------------+-------------------------------------
Description changed by chapoton:

Old description:

> On OSX (10.6.6), when starting zsh, the /etc/zshenv file is always
> executed (even if the -f option is used to start zsh).  This file:
>
> {{{
> # system-wide environment settings for zsh(1)
> if [ -x /usr/libexec/path_helper ]; then
>         eval `/usr/libexec/path_helper -s`
> fi
> }}}
>
> modifies the path to put things like /usr/bin, etc., in at the *start* of
> the path (even though the documentation for path_helper says that it
> *appends* things to the PATH variable).
>
> So in the end, I get:
>
> {{{
> bash-3.2$ ~/sage/sage -sh
> Detected SAGE64 flag
> Building Sage on OS X in 64-bit mode
>
> Starting subshell with Sage environment variables set.
> Be sure to exit when you are done and do not do anything
> with other copies of Sage!
>
> Bypassing shell configuration files ...
>
> SAGE_ROOT=/Users/grout/sage
> (sage subshell) tiny:~/sage/local/bin grout$ echo $PATH
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/texbin:/usr/X11/bin:/Users/grout/sage/local/Frameworks/Python.framework/Versions/2.5/bin:/Users/grout/sage:/Users/grout/sage/local/bin:.
> SAGE_ROOT=/Users/grout/sage
> (sage subshell) tiny:~/sage/local/bin grout$
>

> }}}
>
> Notice that the Sage paths are at the end of the PATH variable.  This
> causes all sorts of problems when trying to do anything with sage -sh.
>
> '''apply''': [attachment:trac-10822-zsh-path.patch] to sage root
> repository

New description:

 On OSX (10.6.6), when starting zsh, the /etc/zshenv file is always
 executed (even if the -f option is used to start zsh).  This file:

 {{{
 # system-wide environment settings for zsh(1)
 if [ -x /usr/libexec/path_helper ]; then
         eval `/usr/libexec/path_helper -s`
 fi
 }}}

 modifies the path to put things like /usr/bin, etc., in at the *start* of
 the path (even though the documentation for path_helper says that it
 *appends* things to the PATH variable).

 So in the end, I get:

 {{{
 bash-3.2$ ~/sage/sage -sh
 Detected SAGE64 flag
 Building Sage on OS X in 64-bit mode

 Starting subshell with Sage environment variables set.
 Be sure to exit when you are done and do not do anything
 with other copies of Sage!

 Bypassing shell configuration files ...

 SAGE_ROOT=/Users/grout/sage
 (sage subshell) tiny:~/sage/local/bin grout$ echo $PATH
 
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/texbin:/usr/X11/bin:/Users/grout/sage/local/Frameworks/Python.framework/Versions/2.5/bin:/Users/grout/sage:/Users/grout/sage/local/bin:.
 SAGE_ROOT=/Users/grout/sage
 (sage subshell) tiny:~/sage/local/bin grout$


 }}}

 Notice that the Sage paths are at the end of the PATH variable.  This
 causes all sorts of problems when trying to do anything with sage -sh.

 '''apply''': [attachment:trac-10822-zsh-path.patch] to sage root
 repository

--

--
Ticket URL: <http://trac.sagemath.org/ticket/10822#comment:37>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to