Fix Nginx package pre_pref

This commit is contained in:
VirtuBox
2019-08-22 15:04:19 +02:00
parent 3dab982954
commit 086da5202b

View File

@@ -62,6 +62,7 @@ class WOStackUpgradeController(CementBaseController):
# All package update
apt_packages = []
packages = []
nginx_packages = []
empty_packages = []
pargs = pargs = self.app.pargs
@@ -89,6 +90,7 @@ class WOStackUpgradeController(CementBaseController):
if pargs.nginx:
if WOAptGet.is_installed(self, 'nginx-custom'):
apt_packages = apt_packages + WOVariables.wo_nginx
nginx_packages = nginx_packages + WOVariables.wo_nginx
else:
Log.info(self, "Nginx Stable is not already installed")
@@ -182,8 +184,7 @@ class WOStackUpgradeController(CementBaseController):
Log.error(self, "Not starting package update")
Log.info(self, "Updating APT packages, please wait...")
if set(WOVariables.wo_nginx).issubset(set(apt_packages)):
pre_pref(self, ['nginx-custom', 'nginx-wo'],
empty_packages)
pre_pref(self, nginx_packages, empty_packages)
# apt-get update
WOAptGet.update(self)
if set(WOVariables.wo_php).issubset(set(apt_packages)):