Index: trunk/testing/installer/installer_util.py |
— | — | @@ -43,7 +43,8 @@ |
44 | 44 | print "check_isolation <instance name>: shows all changes made to mediawiki or database since it was installed." |
45 | 45 | print "update_self: updates the installer and restarts in interactive mode" |
46 | 46 | print "update_tags: manually force an update of the tag cache (do this from time to time, if you're referring to things by tag)" |
47 | | - print "duplicate <source_instance> <destination_instance> make a duplicate mediawiki instance, with copies of configuration, database, and extensions" |
| 47 | + print "duplicate <source_instance> <destination_instance> [language <language_code>] make a duplicate mediawiki instance, with copies of configuration, database, and extensions" |
| 48 | + print "maintenance_update <instance> run maintenance/update_settings.php on an instance to update the database. (run this after you are done installing,updating, and making changes to extensions)" |
48 | 49 | print "TODO: Implement help path , for now, see documentation for info on how to specify <path>" |
49 | 50 | print |
50 | 51 | print "instead of interactive mode, you can also access commands directly from the shell:" |
Index: trunk/testing/installer/intelligent_installer.py |
— | — | @@ -0,0 +1,19 @@ |
| 2 | +# This software, copyright (C) 2008-2009 by Wikiation. |
| 3 | +# This software is developed by Kim Bruning. |
| 4 | +# |
| 5 | +# Distributed under the terms of the MIT license. |
| 6 | + |
| 7 | +from combined_installer import Combined_Installer |
| 8 | +from extension_installer2 import extension_installer2 |
| 9 | +from mediawiki_installer import Mediawiki_Installer |
| 10 | + |
| 11 | +def intelligent_installer(): |
| 12 | + """factory: returns a combined installer that installs extensions from either scripted or naive |
| 13 | + |
| 14 | + technical detail: |
| 15 | + For use with installers.get_system(system_name) |
| 16 | + we exploit the fact that instantiation has the same semantics as a function call""" |
| 17 | + mediawiki=Mediawiki_Installer() |
| 18 | + extension2=extension_installer2() |
| 19 | + combined=Combined_Installer([mediawiki,extension2]) |
| 20 | + return combined |
Index: trunk/testing/installer/combined_installer.py |
— | — | @@ -177,6 +177,8 @@ |
178 | 178 | we also set the same attribute locally. |
179 | 179 | Be careful when reading back!""" |
180 | 180 | self.__dict__[name]=value |
| 181 | + if name=="systemlist": # prevent infinite recursion |
| 182 | + return |
181 | 183 | if self.systemlist: |
182 | 184 | for system in self.systemlist: |
183 | 185 | system.__setattr__(name,value) |
Index: trunk/testing/installer/extension_installer2.py |
— | — | @@ -7,7 +7,6 @@ |
8 | 8 | from scripted_installer import Scripted_Installer |
9 | 9 | from naive_installer import Naive_Installer |
10 | 10 | |
11 | | - |
12 | 11 | def extension_installer2(): |
13 | 12 | """factory: returns a combined installer that installs extensions from either scripted or naive |
14 | 13 | |
Index: trunk/testing/installer/installers.py |
— | — | @@ -19,6 +19,7 @@ |
20 | 20 | from installation_system import Installer_Exception |
21 | 21 | from download_installer import Download_Installer |
22 | 22 | from extension_installer2 import extension_installer2 |
| 23 | +from intelligent_installer import intelligent_installer |
23 | 24 | from test_system import Test_System,Test_Exception |
24 | 25 | |
25 | 26 | from tags import Tags, TagsException |
— | — | @@ -79,7 +80,7 @@ |
80 | 81 | if ppath["installer"]==None: |
81 | 82 | return ls_systems() |
82 | 83 | else: |
83 | | - ppath["system"]="mediawiki" # XXX hardcoded default |
| 84 | + ppath["system"]="intelligent" # XXX hardcoded default |
84 | 85 | |
85 | 86 | return ls_installed_in_system(ppath) |
86 | 87 | |
— | — | @@ -218,7 +219,7 @@ |
219 | 220 | |
220 | 221 | ppath=None |
221 | 222 | try: |
222 | | - ppath=parse_path(" ".join(args[1:]), defaults={'ai':'available','system':'mediawiki'}) |
| 223 | + ppath=parse_path(" ".join(args[1:]), defaults={'ai':'available','system':'intelligent'}) |
223 | 224 | except Parse_Exception,e: |
224 | 225 | print str(e) |
225 | 226 | return |
— | — | @@ -272,7 +273,7 @@ |
273 | 274 | |
274 | 275 | ppath=None |
275 | 276 | try: |
276 | | - ppath=parse_path(" ".join(args[1:]),defaults={'ai':'installed','system':'mediawiki'}) |
| 277 | + ppath=parse_path(" ".join(args[1:]),defaults={'ai':'installed','system':'intelligent'}) |
277 | 278 | except Parse_Exception,e: |
278 | 279 | print str(e) |
279 | 280 | return |
— | — | @@ -463,7 +464,7 @@ |
464 | 465 | |
465 | 466 | # Constants |
466 | 467 | |
467 | | -systems={'toolkit':Toolkit_Installer,'scripted': Scripted_Installer, 'mediawiki':Mediawiki_Installer,'naive': Naive_Installer, 'download':Download_Installer, 'extension':extension_installer2} |
| 468 | +systems={'toolkit':Toolkit_Installer,'scripted': Scripted_Installer, 'mediawiki':Mediawiki_Installer,'naive': Naive_Installer, 'download':Download_Installer, 'extension':extension_installer2, 'intelligent':intelligent_installer} |
468 | 469 | |
469 | 470 | |
470 | 471 | if __name__=="__main__": |