From f74f301e869b3cac9060a1f35b89df673805c08a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 19 Jun 2013 14:07:17 -0700 Subject: [PATCH] depgraph: fix installed/newuse logic more The matched_pkgs_ignore_use logic, introduced in commit dc8d70479dfb54a1f2561ba3fe82d7a62d97964f, is questionable because we need to ensure that an installed package can be selected if there are no other available packages that match a given USE-dep. --- pym/_emerge/depgraph.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 3c5215989..b2d79a808 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -4642,7 +4642,6 @@ class depgraph(object): vardb = self._frozen_config.roots[root].trees["vartree"].dbapi # List of acceptable packages, ordered by type preference. matched_packages = [] - matched_pkgs_ignore_use = [] highest_version = None if not isinstance(atom, portage.dep.Atom): atom = portage.dep.Atom(atom) @@ -4824,7 +4823,6 @@ class depgraph(object): if atom.use: - matched_pkgs_ignore_use.append(pkg) if autounmask_level and autounmask_level.allow_use_changes and not pkg.built: target_use = {} for flag in atom.use.enabled: @@ -4916,8 +4914,7 @@ class depgraph(object): # Compare built package to current config and # reject the built package if necessary. if built and not useoldpkg and \ - (not installed or - any(other_pkg != pkg for other_pkg in matched_pkgs_ignore_use)) and \ + (not installed or matched_packages) and \ not (installed and self._frozen_config.excluded_pkgs.findAtomForPackage(pkg, modified_use=self._pkg_use_enabled(pkg))) and \ -- 2.26.2