Opened 9 years ago
Closed 9 years ago
#14303 closed enhancement (fixed)
"sage -i" should only run sage-location if it exists
Reported by: | jhpalmieri | Owned by: | GeorgSWeber |
---|---|---|---|
Priority: | minor | Milestone: | sage-5.9 |
Component: | build | Keywords: | sage-location |
Cc: | jdemeyer | Merged in: | sage-5.9.beta1 |
Authors: | John Palmieri | Reviewers: | Jeroen Demeyer |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
During Sage installation, I sometimes see an spkg fail to build, for example zn_poly. Then I run
$ ./sage -i spkg/standard/zn_poly-0.9.p10.spkg
If this installs successfully, it still has a return code of 127 (on OS X, at least), because the installation runs sage-location
at the end, which hasn't been installed yet. So perhaps sage -i ...
should only run sage-location
if it already exists. This way something like
$ make || ./sage -i spkg/standard/zn_poly-0.9.p10.spkg && make ptestlong
might work the way I want, and building Sage would require less babysitting.
Attachments (1)
Change History (7)
comment:1 Changed 9 years ago by
- Status changed from new to needs_review
comment:2 Changed 9 years ago by
You should check Python also. I would go for
if [ -x "$SAGE_LOCAL/bin/python" -a -x "$SAGE_LOCAL/bin/sage-location" ]
comment:3 Changed 9 years ago by
Just for completeness, you could also use the more "Pythonic"
sage-location status=$? if [ $status -eq 126 -o $status -eq 127 ]; then # Python or sage-location doesn't exist exit 0 fi exit $status
but I wouldn't, since it might use system Python if Sage's Python isn't installed and you would still an error message if it fails to run sage-location
.
comment:4 Changed 9 years ago by
- Description modified (diff)
Here's a new patch, using if [ -x "$SAGE_LOCAL/bin/python" -a -x "$SAGE_LOCAL/bin/sage-location" ]...
.
comment:5 Changed 9 years ago by
- Reviewers set to Jeroen Demeyer
- Status changed from needs_review to positive_review
comment:6 Changed 9 years ago by
- Merged in set to sage-5.9.beta1
- Resolution set to fixed
- Status changed from positive_review to closed
Here's a first patch. I wouldn't be surprised if there were better ways of doing this.