InstallabilityTester: Update the pseudo-essential cache when we remove a "choice" too

When we're removing choice, we need to look into all the choice groups
and invalidate the cache if it's in there.
ubuntu/dry-run
Iain Lane 4 years ago
parent e5c3f86393
commit fab4a6eed9

@ -163,9 +163,11 @@ class InstallabilityTester(object):
if pkg_id in self._suite_contents: if pkg_id in self._suite_contents:
self._suite_contents.remove(pkg_id) self._suite_contents.remove(pkg_id)
if pkg_id.architecture in self._cache_ess and pkg_id in self._cache_ess[pkg_id.architecture][0]: if pkg_id.architecture in self._cache_ess:
# Removes a package from the "pseudo-essential set" (start, ess_never, ess_choices) = self._cache_ess[pkg_id.architecture]
del self._cache_ess[pkg_id.architecture] if pkg_id in start or any([pkg_id in choices for choices in ess_choices]):
# Removes a package from the "pseudo-essential set"
del self._cache_ess[pkg_id.architecture]
if not self._universe.reverse_dependencies_of(pkg_id): if not self._universe.reverse_dependencies_of(pkg_id):
# no reverse relations - safe # no reverse relations - safe

Loading…
Cancel
Save