#9811: sage exits with 0, even if it is unable to install a package.
------------------------+---------------------------------------------------
   Reporter:  drkirkby  |       Owner:  GeorgSWeber
       Type:  defect    |      Status:  new        
   Priority:  major     |   Milestone:  sage-4.6   
  Component:  build     |    Keywords:             
     Author:            |    Upstream:  N/A        
   Reviewer:            |      Merged:             
Work_issues:            |  
------------------------+---------------------------------------------------

Comment(by leif):

 Replying to [ticket:9811 drkirkby]:
 >
 {{{
 drkir...@hawk:~/sage-4.5.2$ ./sage -f some-non-existant-package
 ...
 drkir...@hawk:~/sage-4.5.2$ $?
 bash: 0: command not found
 drkir...@hawk:~/sage-4.5.2$
 }}}


 > In contrast, if I try this with a well written command like {{{ls}}}
 > [...] the exit code is non-zero - in this case 2.

 Well, you did {{{sage -f ...}}} ...

 A well written command like {{{rm}}} exits with a zero status if you use
 {{{-f}}}:
 {{{
 #!sh
 l...@quadriga:~/Sage/spkgs/mpir-2.1.1$ rm -f non-existent-package ; echo
 $?
 0
 }}}

 I wonder what Sage returns if you do {{{sage -i ...}}} instead... ;-)

 Btw, {{{sage-spkg}}} has lots of other flaws. I'm considering writing (and
 using) my own version, since I doubt the bunch of changes I aim at would
 get merged soon... (Same for the top-level Makefile, which by the way was
 named {{{makefile}}}, I guess by some DOS programmer.)

 Hopefully not too many people read our tickets... :D

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9811#comment:1>
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.

Reply via email to