From fab4a6eed944095b4f27c53ac6369a1054c5cc88 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Fri, 30 Oct 2020 15:01:24 +0000 Subject: [PATCH] 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. --- britney2/installability/tester.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/britney2/installability/tester.py b/britney2/installability/tester.py index 26c67af..8e82f90 100644 --- a/britney2/installability/tester.py +++ b/britney2/installability/tester.py @@ -163,9 +163,11 @@ class InstallabilityTester(object): if pkg_id in self._suite_contents: 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]: - # Removes a package from the "pseudo-essential set" - del self._cache_ess[pkg_id.architecture] + if pkg_id.architecture in self._cache_ess: + (start, ess_never, ess_choices) = 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): # no reverse relations - safe