[hg] galaxy 3038: Explicitly check eggs and fetch when starting, ...
details: http://www.bx.psu.edu/hg/galaxy/rev/56f0d16aa299 changeset: 3038:56f0d16aa299 user: Nate Coraor <nate@bx.psu.edu> date: Mon Nov 16 14:42:09 2009 -0500 description: Explicitly check eggs and fetch when starting, instead of relying on automatic in-process fetching. Also contains a fix for pysqlite egg building diffstat: run.sh | 19 +++++++++++++++++++ scripts/check_eggs.py | 14 +++++++++++--- scripts/scramble/scripts/pysqlite.py | 2 +- 3 files changed, 31 insertions(+), 4 deletions(-) diffs (71 lines): diff -r 3d0e1bdd6ce1 -r 56f0d16aa299 run.sh --- a/run.sh Mon Nov 16 11:27:30 2009 -0500 +++ b/run.sh Mon Nov 16 14:42:09 2009 -0500 @@ -1,4 +1,23 @@ #!/bin/sh cd `dirname $0` + +# explicitly attempt to fetch eggs before running +FETCH_EGGS=1 +for arg in "$@"; do + [ "$arg" = "--stop-daemon" ] && FETCH_EGGS=0; break +done +if [ $FETCH_EGGS -eq 1 ]; then + python -ES ./scripts/check_eggs.py quiet + if [ $? -ne 0 ]; then + echo "Some eggs are out of date, attempting to fetch..." + python -ES ./scripts/fetch_eggs.py + if [ $? -eq 0 ]; then + echo "Fetch successful." + else + echo "Fetch failed." + exit 1 + fi + fi +fi python -ES ./scripts/paster.py serve universe_wsgi.ini $@ diff -r 3d0e1bdd6ce1 -r 56f0d16aa299 scripts/check_eggs.py --- a/scripts/check_eggs.py Mon Nov 16 11:27:30 2009 -0500 +++ b/scripts/check_eggs.py Mon Nov 16 14:42:09 2009 -0500 @@ -11,6 +11,12 @@ lib = os.path.abspath( os.path.join( os.path.dirname( __file__ ), "..", "lib" ) ) sys.path.append( lib ) +try: + assert sys.argv[1] == 'quiet' + quiet = True +except: + quiet = False + from galaxy.eggs import * c = Crate() @@ -21,7 +27,9 @@ if not galaxy_config.check_conditional( name ): ignore.append( name ) if not c.find( ignore=ignore ): - print "Some of your Galaxy eggs are out of date. Please update them" - print "by running:" - print " python scripts/fetch_eggs.py" + if not quiet: + print "Some of your Galaxy eggs are out of date. Please update them" + print "by running:" + print " python scripts/fetch_eggs.py" sys.exit( 1 ) +sys.exit( 0 ) diff -r 3d0e1bdd6ce1 -r 56f0d16aa299 scripts/scramble/scripts/pysqlite.py --- a/scripts/scramble/scripts/pysqlite.py Mon Nov 16 11:27:30 2009 -0500 +++ b/scripts/scramble/scripts/pysqlite.py Mon Nov 16 14:42:09 2009 -0500 @@ -33,10 +33,10 @@ # tag me = sys.argv[0] sys.argv = [ me ] +sys.argv.append( "build_static" ) if tag is not None: sys.argv.append( "egg_info" ) sys.argv.append( "--tag-build=%s" %tag ) -sys.argv.append( "build_static" ) sys.argv.append( "bdist_egg" ) # go
participants (1)
-
Greg Von Kuster