From: Zac Medico Date: Wed, 19 Jun 2013 20:05:28 +0000 (-0700) Subject: depgraph: fix --exclude/--newuse interaction X-Git-Tag: v2.2.0_alpha182~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ca2e34f3b9615c4f1e1d6d258fa5dab6f6c3d6dd;p=portage.git depgraph: fix --exclude/--newuse interaction This fixes a case where an installed package could possibly be rejected due to --newuse, even though it was selected by --exclude. The problem may have been triggered randomly by differences in graph traversal order, which may have been affected by hash randomization (enabled by default since Python 3.3). --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index cb7d3d61e..3c5215989 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -4915,7 +4915,12 @@ class depgraph(object): break # Compare built package to current config and # reject the built package if necessary. - if built and not useoldpkg and (not installed or matched_pkgs_ignore_use) and \ + if built and not useoldpkg and \ + (not installed or + any(other_pkg != pkg for other_pkg in matched_pkgs_ignore_use)) and \ + not (installed and + self._frozen_config.excluded_pkgs.findAtomForPackage(pkg, + modified_use=self._pkg_use_enabled(pkg))) and \ ("--newuse" in self._frozen_config.myopts or \ "--reinstall" in self._frozen_config.myopts or \ (not installed and self._dynamic_config.myparams.get(