r47710 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47709‎ | r47710 | r47711 >
Date:16:49, 23 February 2009
Author:kim
Status:deferred
Tags:
Comment:
Added support for setup.sh/py/etc

UNTESTED!
Modified paths:
  • /trunk/wikiation/installer/installation_system.py (modified) (history)

Diff [purge]

Index: trunk/wikiation/installer/installation_system.py
@@ -150,13 +150,32 @@
151151
152152 self.download(installer_name)
153153 self.install_settings(installer_name)
 154+ self.setup(installer_name)
154155 # ...
155 - # ...
156156
157157 #query the installer to see if ot thinks the component is properly installed
158158 # any flaws at this point are the fault of the installer :-P
159159 return self.is_installed(installer_name)
160160
 161+ def setup(self, installer_name, destination_dir=None):
 162+ """perform actions needed to setup an extension post-download"""
 163+
 164+ destination_dir=destination_dir or self.destination_dir
 165+ if not destination_dir:
 166+ raise Exception("Installation_system: Internal Error: No destination_dir provided")
 167+
 168+ if not self.exists(installer_name):
 169+ raise Installer_Exception("Can't find installer "+installer_name)
 170+
 171+ self.do_setup(installer_name,destination_dir)
 172+
 173+ def do_setup(self, installer_name, destination_dir):
 174+ if not self.can_exec(installer_name,"setup"):
 175+ print "notice: cannot execute setup script for "+installer_name
 176+ return
 177+
 178+ self.exec_task(installer_name,"setup")
 179+
161180 def download (self, installer_name, destination_dir=None):
162181 """perform actions needed to download all the files we need"""
163182

Status & tagging log