[entropy.client.interfaces.dep] filter out list of removable packages by excluding those with reverse dependencies

This commit is contained in:
Fabio Erculiani
2011-03-07 19:42:40 +01:00
parent c9993797ed
commit 7ff82e776f
@@ -2106,6 +2106,13 @@ class CalculatorsMixin:
if m_action > 0 and (matchresults not in update):
update.append(matchresults)
# validate remove, do not return installed packages that are
# still referenced by others as "removable"
# check inverse dependencies at the cost of growing complexity
if remove:
remove = [x for x in remove if not \
self._installed_repository.retrieveReverseDependencies(x)]
if self.xcache:
c_hash = self._get_updates_cache_hash(repo_hash, empty,
ignore_spm_downgrades)