-
-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sage-native-execute does not unset path etc. #10286
Comments
apply to SAGE_LOCAL/bin |
Attachment: trac_10286_fix_sage-native-execute.patch.gz Attachment: trac_10286_call_jmol_correctly.patch.gz Apply to sage library |
This comment has been minimized.
This comment has been minimized.
comment:1
The two patches fix #9232 for me. |
comment:3
The patch to the Sage library looks ok, the patches to the scripts less optimal. Besides that I get eye cancer from The usage of curly braces around environment variables is inconsistent; I would simply drop them here. If we really use additional variables just to record if others were already set (which is mostly superfluous), I would either use I would also move the definition of There are lots of useless
Perhaps we should also "save" Sage's modified paths to be able to revert the settings in scripts / programs called with the original settings, e.g. by
s/can not/cannot/. I don't know where With the above changes, #!/bin/sh
unset PYTHONHOME PYTHONPATH
PATH=$SAGE_ORIG_PATH
LD_LIBRARY_PATH=$SAGE_ORIG_LD_LIBRARY_PATH
DYLD_LIBRARY_PATH=$SAGE_ORIG_DYLD_LIBRARY_PATH # doesn't pollute environment on non-Darwin systems
exec "$@" or maybe (if we don't want to rely on ...
test -n "$SAGE_ORIG_PATH" && PATH=$SAGE_ORIG_PATH
# etc., which is equivalent to
PATH=${SAGE_ORIG_PATH:-$PATH}
... (Or, if desired, we could instead just add the usual "sanity check" In : ${SAGE_ORIG_PATH:=$PATH} # assign if not already set
# etc., and drop the *_SET variables (which may set I wonder if we shouldn't also save The lines of the commit messages shouldn't exceed 80 columns. Just my 2 cents. |
Changed keywords from sage-native-execute, jmol to sage-native-execute jmol LD_LIBRARY_PATH original save restore sage-env |
Reviewer: Leif Leonhardy |
comment:4
Replying to @nexttime:
: ${SAGE_ORIG_PATH:=$PATH} # assign if not already set
# etc., and drop the *_SET variables
I've opened #10469 to address that (sourcing |
comment:5
The patch attachment: trac_10286_call_jmol_correctly.patch will be used on #9232 instead. |
comment:6
Is this still relevant? Why is |
comment:7
Replying to @jdemeyer:
I think it still is. For instance if you start up magma (in the notebook for instance), it's run via |
comment:8
See for instance #8560, before which Nils' comment wasn't true, I think. |
comment:9
Fine, so it seems that On my system, I just replaced |
comment:10
In any case, this needs to be rebased. |
comment:15
Since the jmol issue was solved elsewhere, isn't this ticket a duplicate of #9386 ? |
The script unsets the LD_LIBRARY_PATH but not the PATH, and then
executes the argument. So it essentially breaks execution of all
programs that are shipped with sage since they can't find their
libraries any more, unless you are lucky and the system libraries have the same version.
3d plots on the Sage command line call "sage-native-execute jmol",
which is why 3d plotting in Fedora is broken since forever, see #9232.
The goal of this ticket is to
sage-native-execute
to revert more of the pre-Sage environment, in particular the PATH.sage-native-execute
for Sage components like jmol.Related tickets:
CC: @mwhansen @nbruin tbd
Component: misc
Keywords: sage-native-execute jmol LD_LIBRARY_PATH original save restore sage-env
Author: Volker Braun
Reviewer: Leif Leonhardy
Issue created by migration from https://trac.sagemath.org/ticket/10286
The text was updated successfully, but these errors were encountered: