#10822: sage -sh doesn't set the path right if default shell is zsh on OSX
----------------------------------------------+-----------------------------
Reporter: jason | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.0
Component: scripts | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: John Palmieri, Jason Grout | Merged in:
Dependencies: #11866, #11790 | Stopgaps:
----------------------------------------------+-----------------------------
Changes (by {'newvalue': u'John Palmieri, Jason Grout', 'oldvalue': u'John
Palmieri'}):
* status: needs_work => needs_review
* milestone: => sage-5.0
* author: John Palmieri => John Palmieri, Jason Grout
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.
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
--
Comment:
I've uploaded my take on what should be done. Apply patch to root
repository.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10822#comment:23>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.