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