summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-07-25 13:54:46 -0700
committerZac Medico <zmedico@gentoo.org>2011-07-25 13:54:46 -0700
commit3b5dede734e19aeedca11327e1e2b8443ec55f81 (patch)
tree2795bf94bb39014c2b8e41ffd332f19238cb575c
parent57ab2c80af9e4990411f51f8682d340926eea969 (diff)
downloadportage-3b5dede734e19aeedca11327e1e2b8443ec55f81.tar.gz
portage-3b5dede734e19aeedca11327e1e2b8443ec55f81.tar.bz2
portage-3b5dede734e19aeedca11327e1e2b8443ec55f81.zip
depgraph: make --exclude handle contradictions
This makes contradictory things like `emerge -e @system --exclude gcc` work as expected.
-rw-r--r--pym/_emerge/depgraph.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 9e3064d25..70f9a99dd 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2289,7 +2289,10 @@ class depgraph(object):
# specified on the command line.
self._dynamic_config._pprovided_args.append((arg, atom))
continue
- if pkg.installed and "selective" not in self._dynamic_config.myparams:
+ if pkg.installed and \
+ "selective" not in self._dynamic_config.myparams and \
+ not self._frozen_config.excluded_pkgs.findAtomForPackage(
+ pkg, modified_use=self._pkg_use_enabled(pkg)):
self._dynamic_config._unsatisfied_deps_for_display.append(
((myroot, atom), {"myparent" : arg}))
# Previous behavior was to bail out in this case, but
@@ -3331,6 +3334,9 @@ class depgraph(object):
"""
if "selective" not in self._dynamic_config.myparams and \
pkg.root == self._frozen_config.target_root:
+ if self._frozen_config.excluded_pkgs.findAtomForPackage(pkg,
+ modified_use=self._pkg_use_enabled(pkg)):
+ return True
try:
next(self._iter_atoms_for_pkg(pkg))
except StopIteration: