Browse Source

fixed dependenc purge problem in mail stack

bugfixes
harshadyeola 10 years ago
parent
commit
a740dfba13
  1. 1
      ee/cli/plugins/site.py
  2. 32
      ee/core/aptget.py

1
ee/cli/plugins/site.py

@ -836,7 +836,6 @@ class EESiteUpdateController(CementBaseController):
if oldsitetype == 'mysql':
config_file = (ee_site_webroot + '/backup/{0}/ee-config.php'
.format(EEVariables.ee_date))
print(config_file, 'DB_NAME')
data['ee_db_name'] = (EEFileUtils.grep(self, config_file,
'DB_NAME')
.split(',')[1]

32
ee/core/aptget.py

@ -151,6 +151,8 @@ class EEAptGet():
fprogress = apt.progress.text.AcquireProgress()
iprogress = apt.progress.base.InstallProgress()
onelevel = []
my_selected_packages = []
# Cache Initialization
if not cache:
@ -176,22 +178,11 @@ class EEAptGet():
# 2) We sequentially remove every package in list
# - via is_auto_installed we check if we can safely remove it
deplist = []
onelevel = __dependencies_loop(cache, deplist, pkg,
onelevel=True)
onelevel = onelevel + __dependencies_loop(cache, deplist, pkg,
onelevel=True)
# Mark for deletion the first package, to fire up
# auto_removable Purge?
for dep in onelevel:
my_selected_packages.append(dep.name)
try:
if purge:
dep.mark_delete(purge=True)
else:
dep.mark_delete(purge=False)
except SystemError as e:
Log.debug(self, "{0}".format(e))
Log.error(self, "Unable to purge depedencies.")
try:
if purge:
pkg.mark_delete(purge=True)
@ -199,7 +190,20 @@ class EEAptGet():
pkg.mark_delete(purge=False)
except SystemError as e:
Log.debug(self, "{0}".format(e))
Log.error(self, "Unable to purge packages.")
apt.ProblemResolver(cache).remove(pkg)
# print(pkg.inst_state)
# Log.error(self, "Unable to purge packages.")
for dep in onelevel:
my_selected_packages.append(dep.name)
try:
if purge:
dep.mark_delete(purge=True)
else:
dep.mark_delete(purge=False)
except SystemError as e:
Log.debug(self, "{0}".format(e))
Log.error(self, "Unable to purge depedencies.")
# Check if packages available for remove/update.
if cache.delete_count > 0:

Loading…
Cancel
Save