Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

WIP: Splits the 'Download_Unpack' phase

git-svn-id: svn://cherokee-project.com/wizards2@6786 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
commit 15a3beb27a00434161b2257e22d9ce21a7958aa4 1 parent e072303
@alobbs alobbs authored
View
6 Wizard2.py
@@ -55,7 +55,10 @@ def Check_Parameters (self):
def Check_Prerequisites (self):
pass
- def Download_Unpack (self):
+ def Download (self):
+ pass
+
+ def Unpack (self):
pass
def Configure_Cherokee (self):
@@ -173,7 +176,6 @@ def _Handle_Download (self, tarball=None):
return []
-
def _Handle_Unpacking (self):
if not self.targz_path:
return
View
17 Wizard2_GUI.py
@@ -392,10 +392,20 @@ def check_prerequisites (stage_obj):
# Ok
return {'retcode': 0}
-def download_unpack (stage_obj):
+def download (stage_obj):
installer = stage_obj.installer
- errors = installer.Download_Unpack()
+ errors = installer.Download()
+ if errors:
+ return {'retcode': 1, 'stderr': errors[0]}
+
+ # Ok
+ return {'retcode': 0}
+
+def unpack (stage_obj):
+ installer = stage_obj.installer
+
+ errors = installer.Unpack()
if errors:
return {'retcode': 1, 'stderr': errors[0]}
@@ -425,7 +435,8 @@ def __init__ (self, Install_Class, next_url):
({'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': "Checking requisites...", 'params': {'stage_obj': self}}),
- ({'function': download_unpack, 'description': "Downloading...", 'params': {'stage_obj': self}}),
+ ({'function': download, 'description': "Downloading...", 'params': {'stage_obj': self}}),
+ ({'function': unpack, 'description': "Unpacking...", 'params': {'stage_obj': self}}),
({'function': configure_cherokee, 'description': "Configuring...", 'params': {'stage_obj': self}}),
]
View
3  cherokee-wizard
@@ -54,7 +54,8 @@ def install (wizard_path, params):
# Go through all the installation phases
for phase in (installer.Check_Parameters,
installer.Check_Prerequisites,
- installer.Download_Unpack,
+ installer.Download,
+ installer.Unpack,
installer.Configure_Cherokee):
errors = phase()
View
11 templates/PHP.py
@@ -70,16 +70,13 @@ def Check_Prerequisites (self):
return []
- def Download_Unpack (self):
- # Download
+ def Download (self):
errors = self._Handle_Download (tarball = self._tarball_url)
- if errors: return errors
+ return errors or []
- # Unpack
+ def Unpack (self):
errors = self._Handle_Unpacking ()
- if errors: return errors
-
- return []
+ return errors or []
def Configure_Cherokee (self):
# PHP
Please sign in to comment.
Something went wrong with that request. Please try again.