Browse Source

update php packages variable

master
Prabuddha Chakraborty 9 years ago
parent
commit
cfa6adc888
  1. 11
      ee/cli/plugins/site_functions.py
  2. 10
      ee/cli/plugins/stack.py
  3. 13
      ee/core/variables.py

11
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")

10
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")

13
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"

Loading…
Cancel
Save