Index: trunk/wikiation/installer/settings.py.example |
— | — | @@ -37,10 +37,15 @@ |
38 | 38 | |
39 | 39 | # what mysql command should be used. (Who us? Use horrible hacks?) |
40 | 40 | |
41 | | -mysql_command="mysql -uwiki -pwiki1234" |
| 41 | +mysql_command="mysql -uroot" |
42 | 42 | |
43 | 43 | # run automated tests during installation |
44 | 44 | # this is useful if you are in a testing environment. |
45 | 45 | # If you are running production, you might want to leave |
46 | 46 | # this set to False. |
47 | 47 | run_automated_tests=False |
| 48 | + |
| 49 | + |
| 50 | +# Print debugging messages when executing insatller scripts |
| 51 | +# (off by default) |
| 52 | +debug=False |
Index: trunk/wikiation/installer/settings_handler.py |
— | — | @@ -2,10 +2,14 @@ |
3 | 3 | # This software is developed by Kim Bruning. |
4 | 4 | # |
5 | 5 | # Distributed under the terms of the MIT license. |
6 | | -# ====================================== |
7 | | -#Default settings file. DO NOT EDIT (edit settings.py instead) |
8 | | -# ======================================= |
| 6 | +# |
| 7 | +# ============================================================= |
| 8 | +# Default settings file. DO NOT EDIT (edit settings.py instead) |
| 9 | +# ============================================================= |
9 | 10 | |
| 11 | +# Provides sane defauls and backwards compatibility for |
| 12 | +# settings.py. |
| 13 | + |
10 | 14 | import os |
11 | 15 | |
12 | 16 | # "You Are Here" |
— | — | @@ -46,8 +50,8 @@ |
47 | 51 | # this set to False. |
48 | 52 | run_automated_tests=False |
49 | 53 | |
| 54 | +debug=False |
50 | 55 | |
51 | | - |
52 | 56 | if os.path.exists(os.path.join(installerdir, 'settings.py')): |
53 | 57 | from settings import * |
54 | 58 | |
Index: trunk/wikiation/installer/installation_system.py |
— | — | @@ -80,9 +80,16 @@ |
81 | 81 | if filename.startswith(task2[0]): |
82 | 82 | task2[0]=os.path.join(installdir,filename) |
83 | 83 | try: |
84 | | - #print task2,env #useful for debugging. Might want to make a flag! :-) |
| 84 | + if settings.debug: |
| 85 | + print " === " +task+" === " |
| 86 | + print "environment",env |
| 87 | + print "task",task2 |
85 | 88 | process=subprocess.Popen(task2 ,stdout=subprocess.PIPE, env=env) |
86 | 89 | stdout,stderr=process.communicate() |
| 90 | + if settings.debug: |
| 91 | + print "stdout:",stdout |
| 92 | + print "stderr:",stderr |
| 93 | + print |
87 | 94 | except Exception, e: |
88 | 95 | #reraise with task and env info included, to give us a clue where we went wrong |
89 | 96 | raise Exception((e,task2,env)) |