Browse Source

Fixed MySQL repo error

bugfixes
gau1991 10 years ago
parent
commit
7b199f6e47
  1. 5
      ee/cli/plugins/stack.py
  2. 8
      ee/cli/plugins/stack_migrate.py
  3. 2
      ee/core/aptget.py

5
ee/cli/plugins/stack.py

@ -88,6 +88,11 @@ class EEStackController(CementBaseController):
if set(EEVariables.ee_mysql).issubset(set(apt_packages)):
Log.info(self, "Adding repository for MySQL, please wait ...")
mysql_pref = ("Package: *\nPin: origin mirror.aarnet.edu.au"
"\nPin-Priority: 1000\n")
with open('/etc/apt/preferences.d/'
'MariaDB.pref', 'w') as mysql_pref_file:
mysql_pref_file.write(mysql_pref)
EERepo.add(self, repo_url=EEVariables.ee_mysql_repo)
Log.debug(self, 'Adding key for {0}'
.format(EEVariables.ee_mysql_repo))

8
ee/cli/plugins/stack_migrate.py

@ -31,6 +31,13 @@ class EEStackMigrateController(CementBaseController):
# Add MariaDB repo
Log.info(self, "Adding repository for MariaDB, please wait ...")
mysql_pref = ("Package: *\nPin: origin mirror.aarnet.edu.au"
"\nPin-Priority: 1000\n")
with open('/etc/apt/preferences.d/'
'MariaDB.pref', 'w') as mysql_pref_file:
mysql_pref_file.write(mysql_pref)
EERepo.add(self, repo_url=EEVariables.ee_mysql_repo)
Log.debug(self, 'Adding key for {0}'
.format(EEVariables.ee_mysql_repo))
@ -72,6 +79,7 @@ class EEStackMigrateController(CementBaseController):
Log.info(self, "Updating apt-cache, please wait ...")
EEAptGet.update(self)
Log.info(self, "Installing MariaDB, please wait ...")
EEAptGet.remove(self, ["libmysqlclient18"])
EEAptGet.install(self, apt_packages)
EEAptGet.auto_remove(self)

2
ee/core/aptget.py

@ -59,7 +59,7 @@ class EEAptGet():
global apt_get
apt_get = apt_get.bake("-y")
try:
if purge == "True":
if purge:
for line in apt_get.purge(*packages, _iter=True):
Log.info(self, Log.ENDC+line+Log.OKBLUE, end=' ')
else:

Loading…
Cancel
Save