r50552 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50551‎ | r50552 | r50553 >
Date:16:29, 13 May 2009
Author:kim
Status:deferred
Tags:
Comment:
trademarks
Modified paths:
  • /trunk/wikiation/installer/LICENSE (modified) (history)
  • /trunk/wikiation/installer/installation_system.py (modified) (history)
  • /trunk/wikiation/installer/installer.py (modified) (history)
  • /trunk/wikiation/installer/installer_util.py (modified) (history)
  • /trunk/wikiation/installer/installers.py (modified) (history)
  • /trunk/wikiation/installer/isolation.py (modified) (history)
  • /trunk/wikiation/installer/mediawiki_installer.py (modified) (history)
  • /trunk/wikiation/installer/settings.py.example (deleted) (history)
  • /trunk/wikiation/installer/settings_handler.py (modified) (history)
  • /trunk/wikiation/installer/tests (deleted) (history)
  • /trunk/wikiation/installer/toolkit_installer.py (modified) (history)
  • /trunk/wikiation/installer/util/allnaive.py (modified) (history)

Diff [purge]

Index: trunk/wikiation/installer/settings.py.example
@@ -1,51 +0,0 @@
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 -#Example settings file.
8 -
9 -import os
10 -
11 -# "You Are Here"
12 -installerdir=os.path.dirname(os.path.abspath(__file__))
13 -
14 -# where to find .install directories and the files contained therein
15 -installfiles=os.path.join(installerdir,'installfiles')
16 -
17 -
18 -# where to find mediawiki tags and trunk on svn
19 -tagsdir="http://svn.wikimedia.org/svnroot/mediawiki/tags"
20 -trunkdir="http://svn.wikimedia.org/svnroot/mediawiki/trunk"
21 -# we could alternately/additionally take a tag version for extensions. (future)
22 -extensionsdir=trunkdir+"/extensions"
23 -
24 -# where to install diverse revisions
25 -revisionsdir='/var/www/revisions'
26 -
27 -
28 -# base scriptpath for every installation (ie, where to reach the above over the web)
29 -base_scriptpath="/revisions/"
30 -
31 -# where to install the toolkit
32 -toolkit_dir='/usr/local/wikiation'
33 -
34 -
35 -#where wikiation_check_isolation can be found
36 -isolation_create=toolkit_dir+'/wikiation_check_isolation/create_and_ul.sh'
37 -isolation_test=toolkit_dir+'/wikiation_check_isolation/dl_and_check.sh'
38 -
39 -# what mysql command should be used. (Who us? Use horrible hacks?)
40 -
41 -mysql_command="mysql -uroot"
42 -
43 -# run automated tests during installation
44 -# this is useful if you are in a testing environment.
45 -# If you are running production, you might want to leave
46 -# this set to False.
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/isolation.py
@@ -6,10 +6,10 @@
77 import sys,os, os.path
88 import settings_handler as settings
99
10 -#support for wikiation_check_isolation
 10+#support for check_isolation
1111
1212 def _check_isolation(args):
13 - """wikiation_check_isolation: check diffs now"""
 13+ """check_isolation: check diffs now"""
1414 difftest=settings.isolation_test
1515 command=difftest+" "+" ".join(args)
1616 exit_status=os.system(command)>>8
@@ -30,7 +30,7 @@
3131
3232
3333 def difftests(target):
34 - """wikiation_check_isolation: store diffs, ready for testing later"""
 34+ """check_isolation: store diffs, ready for testing later"""
3535
3636 difftest=settings.isolation_create
3737 command=difftest+" "+target
Index: trunk/wikiation/installer/toolkit_installer.py
@@ -5,7 +5,7 @@
66 from installation_system import Installation_System
77
88 class Toolkit_Installer(Installation_System):
9 - system_name='wikiation_toolkit'
 9+ system_name='toolkit'
1010 def __init__(self,instance=None):
1111 Installation_System.__init__(self, instance)
1212 self.destination_dir=settings.toolkit_dir
Index: trunk/wikiation/installer/installation_system.py
@@ -17,7 +17,7 @@
1818 An installation system understands how to install and uninstall
1919 'things' (instances). An instance might be a particular wiki
2020 (in the case of the mediawiki installer) or a particular extension
21 - in that wiki (extension installer), or perhaps a tool from the wikiation
 21+ in that wiki (extension installer), or perhaps a tool from the
2222 toolkit.
2323 Next to installing and uninstalling, an installer can also determine
2424 the status of an instance (installed or uninstalled), and can provide
@@ -126,7 +126,7 @@
127127 def installdir_name(self, installer_name):
128128 """returns the location of the .install directory for the given installer_name.
129129 An installer directory is where we store all the scripts to install one particular
130 - extension, tool from the wikiation_toolkit, or etc. """
 130+ extension, tool from the toolkit, or etc. """
131131 return os.path.join(self.subsystemdir, installer_name+".install")
132132
133133
Index: trunk/wikiation/installer/mediawiki_installer.py
@@ -279,7 +279,7 @@
280280 uniquesettings=settings.instancesdir+"/"+target+"/InstallerUniqueSettings.php"
281281 unique=file(uniquesettings,"w")
282282 unique.write('<?php\n')
283 - unique.write('$wgSitename = "Wikiation_'+target+'";\n')
 283+ unique.write('$wgSitename = "'+target+'";\n')
284284 unique.write('$wgScriptPath = "'+settings.base_scriptpath+target+'";\n')
285285 unique.write('$wgDBname = "'+target+'";\n')
286286 unique.write('?>\n')
Index: trunk/wikiation/installer/installers.py
@@ -249,7 +249,7 @@
250250 return value
251251
252252 def parse_path(path,defaults=None):
253 - ai=None # available, installed (and now revisions and tags too)
 253+ ai=None # available, installed (and now revisions and tags and test too)
254254 system=None # installation system
255255 installer=None # installer from that installation system
256256 in_installer=None # in which instance should we install?
@@ -369,7 +369,7 @@
370370
371371 # Constants
372372
373 -systems={'wikiation_toolkit':Toolkit_Installer,'scripted': Scripted_Installer, 'mediawiki':Mediawiki_Installer,'naive': Naive_Installer, 'download':Download_Installer, 'extension':extension_installer2}
 373+systems={'toolkit':Toolkit_Installer,'scripted': Scripted_Installer, 'mediawiki':Mediawiki_Installer,'naive': Naive_Installer, 'download':Download_Installer, 'extension':extension_installer2}
374374
375375
376376 if __name__=="__main__":
@@ -382,28 +382,28 @@
383383 # print "ls available"
384384 # ls2(["ls","available"])
385385 # print
386 -# print "ls available/wikiation_toolkit"
387 -# ls2(["ls","available/wikiation_toolkit"])
 386+# print "ls available/toolkit"
 387+# ls2(["ls","available/toolkit"])
388388 # print
389 -# print "ls installed/wikiation_toolkit"
390 -# ls2(["ls","installed/wikiation_toolkit"])
 389+# print "ls installed/toolkit"
 390+# ls2(["ls","installed/toolkit"])
391391 # print
392392 # print "get info"
393 -# system=get_system("wikiation_toolkit")
 393+# system=get_system("toolkit")
394394 # system.get_info("pywikipedia")
395395 #
396396 # print "install"
397397 # print "pywiki",repr(system.install("pywikipedia"))
398 -# print "exttest", repr(system.install("wikiation_exttest"))
399 -# print "isolation", repr(system.install("wikiation_check_isolation"))
 398+# print "exttest", repr(system.install("exttest"))
 399+# print "isolation", repr(system.install("check_isolation"))
400400 # print "ls", os.listdir('..')
401401 #
402402 # print "uninstall"
403403 # print "pywiki", repr(system.uninstall("pywikipedia"))
404 -# print "exttest", repr(system.uninstall("wikiation_exttest"))
405 -# print "isolation", repr(system.uninstall("wikiation_check_isolation"))
 404+# print "exttest", repr(system.uninstall("exttest"))
 405+# print "isolation", repr(system.uninstall("check_isolation"))
406406 #
407 -# print "wikiation_extension (assumes existing wiki)"
 407+# print "extension (assumes existing wiki)"
408408 # extension_installer=Scripted_Installer("REL1_13_3")
409409 #
410410 # print " \ uninstall " , repr (extension_installer.uninstall("ImageMap"))
@@ -447,7 +447,7 @@
448448 # qls('installed.extension:in REL1_13_2')
449449 # qls('installed.extension:in FOO')
450450 # qls('installed.mediawiki:in FOO')
451 -# qls('available.wikiation')
452 -# qls('available.wikiation:in BAR as BAZ')
453 -# qls('available.wikiation:in BOG as BOT')
454 -# qls('available.wikiation:in BOG as BOT murp morp bla bla bla')
 451+# qls('available.toolkit')
 452+# qls('available.toolkit:in BAR as BAZ')
 453+# qls('available.toolkit:in BOG as BOT')
 454+# qls('available.toolkit:in BOG as BOT murp morp bla bla bla')
Index: trunk/wikiation/installer/util/allnaive.py
@@ -6,7 +6,7 @@
77 from naive_installer import Naive_Installer
88
99
10 -from wikiation_exttest import settings
 10+from exttest import settings
1111
1212 # settings
1313 target_wiki='test'
Index: trunk/wikiation/installer/installer_util.py
@@ -1,6 +1,6 @@
22 # This software, copyright (C) 2008-2009 by Wikiation.
3 -# This software is developed by Kim Bruning.
4 -#
 3+# Copyright (C) 2009 Kim Bruning
 4+
55 # Distributed under the terms of the MIT license.
66
77 import sys, os
@@ -30,7 +30,7 @@
3131 print subhelp[args[1]]
3232 elif len(args)<=1:
3333 print
34 - print "wikiation installer, interactive mode"
 34+ print "installer, interactive mode"
3535 print "help: get help"
3636 print "quit, exit: quit"
3737 print "ls <path>: list information on available versions "
@@ -44,14 +44,14 @@
4545 print "TODO: Implement help path , for now, see documentation for info on how to specify <path>"
4646 print
4747 print "instead of interactive mode, you can also access commands directly from the shell:"
48 - print "wikiation_installer command [args]..."
 48+ print "installer command [args]..."
4949 else:
5050 print 'no detailed help available'
5151
5252
5353
5454 def revision():
55 - """obtain revision number for wikiation_installer itself"""
 55+ """obtain revision number for installer itself"""
5656
5757 revision_string=None
5858 os.chdir(settings.installerdir)
@@ -71,7 +71,7 @@
7272 def intro():
7373 """a nice banner/intro text for interactive mode"""
7474
75 - print "=== Wikiation installer (v. "+revision()+") ==="
 75+ print "=== Installer (v. "+revision()+") ==="
7676 print
7777 print "(last known safe version: 48528)"
7878 print "Interactive mode.",
Index: trunk/wikiation/installer/LICENSE
@@ -1,4 +1,6 @@
2 -This software, copyright (C) 2008-2009 by Wikiation. This software is developed by Kim Bruning.
 2+This software,
 3+Copyright (C) 2008-2009 by Wikiation. (Developed by Kim Bruning)
 4+Copyright (C) 2009 by Kim Bruning
35
46 Permission is hereby granted, free of charge, to any person obtaining a copy
57 of this software and associated documentation files (the "Software"), to deal
@@ -17,5 +19,3 @@
1820 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1921 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2022 SOFTWARE.
21 -
22 -Logo.png itself is a wikiation trademark and is (C) wikiation, all rights reserved (same as the wikimedia or wikipedia logos)
Index: trunk/wikiation/installer/settings_handler.py
@@ -17,6 +17,7 @@
1818
1919 # where to find .install directories and the files contained therein
2020 installfiles=os.path.join(installerdir,'installfiles')
 21+testfiles=os.path.join(installerdir,'testfiles')
2122
2223 # where do we store the _tagcache file
2324 tagcache=os.path.join(installerdir,"_tagcache")
@@ -36,12 +37,12 @@
3738 base_scriptpath="/revisions/"
3839
3940 # where to install the toolkit
40 -toolkit_dir='/usr/local/wikiation'
 41+toolkit_dir='/usr/local/testing'
4142
4243
43 -#where wikiation_check_isolation can be found
44 -isolation_create=toolkit_dir+'/wikiation_check_isolation/create_and_ul.sh'
45 -isolation_test=toolkit_dir+'/wikiation_check_isolation/dl_and_check.sh'
 44+#where check_isolation can be found
 45+isolation_create=toolkit_dir+'/check_isolation/create_and_ul.sh'
 46+isolation_test=toolkit_dir+'/check_isolation/dl_and_check.sh'
4647 # run automated tests during installation
4748 # this is useful if you are in a testing environment.
4849 # If you are running production, you might want to leave
Index: trunk/wikiation/installer/installer.py
@@ -64,7 +64,7 @@
6565 if len(args)<=1:
6666 print \
6767 """available.mediawiki: installed.mediawiki:
68 -available.wikiation_toolkit: installed.wikiation_toolkit:
 68+available.toolkit: installed.toolkit:
6969 available.scripted: installed.scripted: }
7070 available.naive: installed.naive: } extensions
7171 available.download: installer.download: }
@@ -80,6 +80,11 @@
8181 """install something"""
8282 installers.install(args)
8383
 84+def test(args):
 85+ """test something"""
 86+ installers.test(args)
 87+
 88+
8489 def duplicate(args):
8590 """duplicate an instance"""
8691 if len(args)!=3:
@@ -93,7 +98,7 @@
9499 def update_self(args):
95100 """update self to newest revision, (and switch to interactive mode)"""
96101
97 - print "This could cause the wikiation_installer to break. Are you sure? Y/N"
 102+ print "This could cause the installer to break. Are you sure? Y/N"
98103 answer=getch()
99104 if answer.upper()=="Y":
100105 print "Continuing..."
@@ -110,7 +115,7 @@
111116 print "I'm not sure what to do with "+ (" ".join(args[1:]))
112117
113118 print "\n\n"
114 - print "wikiation_installer update attempted/completed. Restarting"
 119+ print "installer update attempted/completed. Restarting"
115120 print "----------------------------------------------------------"
116121 print "\n\n"
117122 os.execl("/usr/bin/python","/usr/bin/python",__file__)
@@ -160,7 +165,8 @@
161166 "check_isolation":check_isolation,
162167 "update_self":update_self,
163168 "update_tags":update_tags,
164 - "duplicate":duplicate
 169+ "duplicate":duplicate,
 170+ "test":test
165171 }
166172
167173 # additional help texts for some commands.

Status & tagging log