Final fix for Xenial stack

This commit is contained in:
VirtuBox 2020-10-15 13:24:00 +02:00
parent 78d8b98437
commit afa17b62dd
Signed by: virtubox
GPG Key ID: 22EB296C97BAD476
2 changed files with 14 additions and 6 deletions

View File

@ -152,13 +152,18 @@ def pre_pref(self, apt_packages):
# nano
if 'nano' in apt_packages:
if WOVar.wo_platform_codename == 'bionic':
Log.debug(self, 'Adding ppa for nano')
WORepo.add(self, ppa=WOVar.wo_ubuntu_backports)
if WOVar.wo_distro == 'ubuntu':
if WOVar.wo_platform_codename == 'bionic':
Log.debug(self, 'Adding ppa for nano')
WORepo.add(self, ppa=WOVar.wo_ubuntu_backports)
elif WOVar.wo_platform_codename == 'xenial':
Log.debug(self, 'Adding ppa for nano')
WORepo.add_key(self, WOVar.wo_nginx_key)
WORepo.add(self, repo_url=WOVar.wo_extra_repo)
else:
if (not WOFileUtils.grepcheck(
self, '/etc/apt/sources.list/wo-repo.list',
'WordOps') and not WOVar.wo_platform_codename == 'focal'):
'WordOps')):
Log.info(self, "Adding repository for Nano, please wait...")
Log.debug(self, 'Adding repository for Nano')
WORepo.add_key(self, WOVar.wo_nginx_key)
@ -1260,8 +1265,7 @@ def post_pref(self, apt_packages, packages, upgrade=False):
'added by WordOps')
# nanorc
if (('nano' in apt_packages) and
(not WOVar.wo_platform_codename == 'xenial')):
if 'nano' in apt_packages:
Log.debug(self, 'Setting up nanorc')
WOGit.clone(self, 'https://github.com/scopatz/nanorc.git',
'/usr/share/nano-syntax-highlighting')

View File

@ -111,6 +111,10 @@ class WOVar():
# Nginx repo and packages
if wo_distro == 'ubuntu':
wo_nginx_repo = "ppa:wordops/nginx-wo"
wo_extra_repo = (
"deb http://download.opensuse.org"
"/repositories/home:/virtubox:"
"/WordOps/xUbuntu_{0}/".format(wo_platform_version))
else:
if wo_distro == 'debian':
if wo_platform_codename == 'jessie':