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
add SAGE_SPKG_INST environment variable #14226
Comments
This comment has been minimized.
This comment has been minimized.
Dependencies: #13432 |
Author: R. Andrew Ohana |
comment:3
breaks stuff... working on a fix... |
comment:4
Ok, found the missing link, should be good now. |
comment:6
Hmmm, I guess its name is pretty likely to confuse new users... Note that |
comment:7
The patch looks fine as a quick solution. In general though, I think that this directory shouldn't be needed from different places at all. There should be two functions (or shell scripts, or ./sage options) like set_installed(name, bool) and is_installed(name) that know about how installation status is tracked, and only they are allowed to know about this directory. Having INST in the environment will allow/encourage people to check installation status themselves, and I think that should be prevented. |
comment:8
Replying to @tkluck:
Maybe, but at the same time it makes it a lot easier to find offending cases if we do move to a pair of functions like you propose, so at the very least this would be a step in the right direction. |
comment:9
Eventually we shouldn't be tracking this information ourselves at all (letting a package manager do it for us) so I'm fine with this "quick" solution. Users shouldn't have to use it, so the name being obscure isn't a big deal (and it's easy to discover reading the code). |
comment:10
|
comment:11
Replying to @nexttime:
Same for |
comment:12
And although this variable is (or should be) only used internally, we should document it (with a warning that it doesn't refer to the location of a Sage installation, nor should be set/modified by the user). 2ct |
Reviewer: Robert Bradshaw, Leif Leonhardy |
Work Issues: Fix files in |
comment:13
There are also instances in the Sage scripts repository ( installed = set(os.listdir(os.path.join(SPKG_ROOT, "installed"))) Same in try:
installed = set(os.listdir(os.path.join(SPKG_ROOT, 'installed')))
except OSError:
installed = set([]) There are presumably even more, but simple grepping yields false positives as well; I've found:
Looking at those, isn't |
comment:18
Replying to @ohanar:
Apply |
comment:19
Seriously, if you really want an absolute path there, create a symbolic link from Btw., what did it break? |
comment:20
Replying to @nexttime:
(Where |
comment:21
I don't mind if it is relative, but I don't want to be fixed to the location |
comment:22
Or, how does Replying to @ohanar:
I meant just in the
See above.
I was just kidding.
Well, just change |
comment:23
Replying to @nexttime:
Yes, this resolves the issue -- which was that any entry of the form |
Changed work issues from Don't quote in deps to none |
comment:24
Replying to @nexttime:
After deep thinking... make INST="`echo ${SAGE_SPKG_INST:-installed} | sed 's/ /\\\\ /g'`" (without changes to I think this should solve all issues. |
comment:25
I'd keep the "default" value of Also, I think there's more than one instance of |
comment:26
ok, made your suggested changes. Testing locally I found no difference when introducing whitespace in the directory name of |
comment:27
Replying to @ohanar:
ShouldTM also work with
|
apply to root repository |
comment:29
Attachment: trac14226_root.patch.gz Rebased to #14263. |
This comment has been minimized.
This comment has been minimized.
Changed reviewer from Robert Bradshaw, Leif Leonhardy to Robert Bradshaw, Leif Leonhardy, Jeroen Demeyer |
comment:30
Attachment: 14226_root_review.patch.gz |
comment:31
Positive review given in person by R. Andrew Ohana. |
Merged: sage-5.9.beta3 |
Changed merged from sage-5.9.beta3 to sage-5.9.beta4 |
There are a fair number of places that does stuff with the directory
SAGE_ROOT/spkg/installed
, so let's add an environment variable for this directory. This will help ease the transition to git.Installation Instructions:
Depends on #13432
Depends on #14263
Component: misc
Keywords: installed spkgs directory
Author: R. Andrew Ohana
Reviewer: Robert Bradshaw, Leif Leonhardy, Jeroen Demeyer
Merged: sage-5.9.beta4
Issue created by migration from https://trac.sagemath.org/ticket/14226
The text was updated successfully, but these errors were encountered: