1 |
commit: 3b5dede734e19aeedca11327e1e2b8443ec55f81 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 25 20:54:46 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 25 20:54:46 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3b5dede7 |
7 |
|
8 |
depgraph: make --exclude handle contradictions |
9 |
|
10 |
This makes contradictory things like `emerge -e @system --exclude gcc` |
11 |
work as expected. |
12 |
|
13 |
--- |
14 |
pym/_emerge/depgraph.py | 8 +++++++- |
15 |
1 files changed, 7 insertions(+), 1 deletions(-) |
16 |
|
17 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
18 |
index 9e3064d..70f9a99 100644 |
19 |
--- a/pym/_emerge/depgraph.py |
20 |
+++ b/pym/_emerge/depgraph.py |
21 |
@@ -2289,7 +2289,10 @@ class depgraph(object): |
22 |
# specified on the command line. |
23 |
self._dynamic_config._pprovided_args.append((arg, atom)) |
24 |
continue |
25 |
- if pkg.installed and "selective" not in self._dynamic_config.myparams: |
26 |
+ if pkg.installed and \ |
27 |
+ "selective" not in self._dynamic_config.myparams and \ |
28 |
+ not self._frozen_config.excluded_pkgs.findAtomForPackage( |
29 |
+ pkg, modified_use=self._pkg_use_enabled(pkg)): |
30 |
self._dynamic_config._unsatisfied_deps_for_display.append( |
31 |
((myroot, atom), {"myparent" : arg})) |
32 |
# Previous behavior was to bail out in this case, but |
33 |
@@ -3331,6 +3334,9 @@ class depgraph(object): |
34 |
""" |
35 |
if "selective" not in self._dynamic_config.myparams and \ |
36 |
pkg.root == self._frozen_config.target_root: |
37 |
+ if self._frozen_config.excluded_pkgs.findAtomForPackage(pkg, |
38 |
+ modified_use=self._pkg_use_enabled(pkg)): |
39 |
+ return True |
40 |
try: |
41 |
next(self._iter_atoms_for_pkg(pkg)) |
42 |
except StopIteration: |