On Sun, Mar 28, 2010 at 12:33 PM, Simon King <simon.k...@nuigalway.ie> wrote: > Hi William! > > On 28 Mrz., 19:55, William Stein <wst...@gmail.com> wrote: >> ... >> No. newest_version is irrelevant. One should look at spk/installed/ > > So, one would test whether > ls spkg/installed/database_gap* > results in an error?
Hmm. I think the best thing is to create a new script in SAGE_ROOT/local/bin/ and encapsulate the check in there. Then in your script call that. I.e., make something that does what you thought newest_version did. First find what the relevant commands are in say apt, rpm, etc., as inspiration for a command name. Regarding the implementation of that script, you could maybe check for ls returning an error (or whatever) as above. However, better would be to write something in Python, e.g., #!/usr/bin/env python import os # do something with os.listdir() --- By factoring out this functionality in a script, we avoid awkward buggy so called "best practices" appearing in spkg-install scripts. As much as possible, anything that could possibly be replicated in several spkg-install scripts should be factored out. William > > Cheers, > Simon > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > > To unsubscribe from this group, send email to > sage-devel+unsubscribegooglegroups.com or reply to this email with the words > "REMOVE ME" as the subject. > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org To unsubscribe from this group, send email to sage-devel+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.