From cfa6adc888324797638cee3b41ce69ddcd80a4c2 Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Fri, 19 Feb 2016 11:25:33 +0530 Subject: [PATCH] update php packages variable --- ee/cli/plugins/site_functions.py | 11 ++++------- ee/cli/plugins/stack.py | 10 +++++++--- ee/core/variables.py | 13 ++++++------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ee/cli/plugins/site_functions.py b/ee/cli/plugins/site_functions.py index cf13529c..2dac1443 100644 --- a/ee/cli/plugins/site_functions.py +++ b/ee/cli/plugins/site_functions.py @@ -68,11 +68,8 @@ def setupdomain(self, data): ee_site_nginx_conf = open('/etc/nginx/sites-available/{0}' .format(ee_domain_name), encoding='utf-8', mode='w') - if not data['php7']: - self.app.render((data), 'virtualconf.mustache', - out=ee_site_nginx_conf) - else: - self.app.render((data), 'virtualconf-php7.mustache', + + self.app.render((data), 'virtualconf.mustache', out=ee_site_nginx_conf) ee_site_nginx_conf.close() except IOError as e: @@ -712,7 +709,7 @@ def site_package_check(self, stype): apt_packages = apt_packages + EEVariables.ee_php else: if not EEAptGet.is_installed(self, 'php5.6-fpm'): - apt_packages = apt_packages + EEVariables.ee_php5_6 + apt_packages = apt_packages + EEVariables.ee_php5_6 + EEVariables.ee_php_extra if self.app.pargs.php7 and stype in [ 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']: if EEVariables.ee_platform_codename == 'trusty': @@ -724,7 +721,7 @@ def site_package_check(self, stype): if not EEAptGet.is_installed(self, 'php5-fpm'): Log.info(self, "Setting apt_packages variable for PHP 5.0") Log.debug(self, "Setting apt_packages variable for PHP 5.0") - apt_packages = apt_packages + EEVariables.ee_php5_6 + apt_packages = apt_packages + EEVariables.ee_php5_6 + EEVariables.ee_php_extra if stype in ['mysql', 'wp', 'wpsubdir', 'wpsubdomain']: Log.debug(self, "Setting apt_packages variable for MySQL") diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 68595967..d0c90a90 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -2170,7 +2170,7 @@ class EEStackController(CementBaseController): Log.debug(self, "Setting apt_packages variable for PHP") if not (EEAptGet.is_installed(self, 'php5-fpm') or EEAptGet.is_installed(self, 'php5.6-fpm')): if EEVariables.ee_platform_codename == 'trusty': - apt_packages = apt_packages + EEVariables.ee_php5_6 + apt_packages = apt_packages + EEVariables.ee_php5_6 + EEVariables.ee_php_extra else: apt_packages = apt_packages + EEVariables.ee_php else: @@ -2184,7 +2184,7 @@ class EEStackController(CementBaseController): if not EEAptGet.is_installed(self, 'php7.0-fpm') : apt_packages = apt_packages + EEVariables.ee_php7_0 if not EEAptGet.is_installed(self, 'php5.6-fpm'): - apt_packages = apt_packages + EEVariables.ee_php5_6 + apt_packages = apt_packages + EEVariables.ee_php5_6 + EEVariables.ee_php_extra else: Log.debug(self, "PHP 7.0 already installed") Log.info(self, "PHP 7.0 already installed") @@ -2439,6 +2439,8 @@ class EEStackController(CementBaseController): Log.debug(self, "Removing apt_packages variable of PHP") if EEVariables.ee_platform_codename == 'trusty': apt_packages = apt_packages + EEVariables.ee_php5_6 + if not EEAptGet.is_installed(self, 'php7.0-fpm'): + apt_packages = apt_packages + EEVariables.ee_php_extra else: apt_packages = apt_packages + EEVariables.ee_php @@ -2446,12 +2448,14 @@ class EEStackController(CementBaseController): if EEVariables.ee_platform_codename == 'trusty': Log.debug(self, "Removing apt_packages variable of PHP 7.0") apt_packages = apt_packages + EEVariables.ee_php7_0 + if not EEAptGet.is_installed(self, 'php5.6-fpm'): + apt_packages = apt_packages + EEVariables.ee_php_extra else: Log.info(self,"PHP 7.0 not supported.") if self.app.pargs.hhvm: if EEAptGet.is_installed(self, 'hhvm'): - Log.debug(self, "Removing apt_packages varible of HHVM") + Log.debug(self, "Removing apt_packages variable of HHVM") apt_packages = apt_packages + EEVariables.ee_hhvm if self.app.pargs.redis: Log.debug(self, "Remove apt_packages variable of Redis") diff --git a/ee/core/variables.py b/ee/core/variables.py index 70a1d955..cdc0093c 100644 --- a/ee/core/variables.py +++ b/ee/core/variables.py @@ -121,14 +121,13 @@ class EEVariables(): elif ee_platform_codename == 'trusty': ee_php_repo = "ppa:ondrej/php" ee_php5_6 = ["php5.6-fpm", "php5.6-curl", "php5.6-gd", "php5.6-imap", - "php5.6-mcrypt", "php5.6-common", "php5.6-readline", - "php5.6-mysql", "php5.6-cli", "php-memcached", "php-imagick", - "memcached", "graphviz", "php-pear", "php-xdebug"] + "php5.6-mcrypt", "php5.6-readline", + "php5.6-mysql", "php5.6-cli"] ee_php7_0 = ["php7.0-fpm", "php7.0-curl", "php7.0-gd", "php7.0-imap", - "php7.0-mcrypt", "php7.0-common", "php7.0-readline", - "php7.0-mysql", "php7.0-cli", "php-memcached", "php-imagick", - "memcached", "graphviz", "php-pear", "php-xdebug"] - ee_php_extra = [] + "php7.0-mcrypt", "php7.0-readline", + "php7.0-mysql", "php7.0-cli"] + ee_php_extra = ["php5.6-common", "php7.0-common", "php-memcached", "php-imagick", "memcached", + "graphviz", "php-pear", "php-xdebug"] elif ee_platform_distro == 'debian': if ee_platform_codename == 'wheezy': ee_php_repo = ("deb http://packages.dotdeb.org {codename}-php56 all"