Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

WIP: New download & unpack phase

git-svn-id: svn://cherokee-project.com/wizards2@6783 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
commit c52a392efd5b1e63732e4edb53b5ab46843fab84 1 parent 1d8039e
@alobbs alobbs authored
View
3  Wizard2.py
@@ -55,6 +55,9 @@ def Check_Parameters (self):
def Check_Prerequisites (self):
pass
+ def Download_Unpack (self):
+ pass
+
def Configure_Cherokee (self):
pass
View
13 Wizard2_GUI.py
@@ -392,6 +392,16 @@ def check_prerequisites (stage_obj):
# Ok
return {'retcode': 0}
+def download_unpack (stage_obj):
+ installer = stage_obj.installer
+
+ errors = installer.Download_Unpack()
+ if errors:
+ return {'retcode': 1, 'stderr': errors[0]}
+
+ # Ok
+ return {'retcode': 0}
+
def configure_cherokee (stage_obj):
installer = stage_obj.installer
@@ -414,7 +424,8 @@ def __init__ (self, Install_Class, next_url):
commands = [
({'function': collect_arguments, 'description': "Collecting arguments...", 'params': {'installer_params': self.installer_params}}),
({'function': check_params, 'description': "Checking parameters...", 'params': {'installer_params': self.installer_params, 'stage_obj': self, 'Install_Class': Install_Class}}),
- ({'function': check_prerequisites, 'description': "Downloading...", 'params': {'stage_obj': self}}),
+ ({'function': check_prerequisites, 'description': "Checking requisites...", 'params': {'stage_obj': self}}),
+ ({'function': download_unpack, 'description': "Downloading...", 'params': {'stage_obj': self}}),
({'function': configure_cherokee, 'description': "Configuring...", 'params': {'stage_obj': self}}),
]
View
7 cherokee-wizard
@@ -65,6 +65,13 @@ def install (wizard_path, params):
print err
return 1
+ # Download and Unpack
+ errors = installer.Download_Unpack()
+ if errors:
+ for err in set(errors):
+ print err
+ return 1
+
# Cherokee Configuration
errors = installer.Configure_Cherokee()
if errors:
View
7 templates/PHP.py
@@ -1,3 +1,4 @@
+
# -*- coding: utf-8; mode: python -*-
#
# Cherokee-admin
@@ -66,13 +67,17 @@ def Check_Prerequisites (self):
errors = self.php.Check_Prerequisites()
if errors: return errors
- # Wordpress
+ def Download_Unpack (self):
+ # Download
errors = self._Handle_Download (tarball = self._tarball_url)
if errors: return errors
+ # Unpack
errors = self._Handle_Unpacking ()
if errors: return errors
+ return []
+
def Configure_Cherokee (self):
# PHP
errors = self.php.Configure_Cherokee()

0 comments on commit c52a392

Please sign in to comment.
Something went wrong with that request. Please try again.