1 |
commit: ae2103b5d8936b105edf2e5fba4c9b191f74415b |
2 |
Author: Sebastian Luther <SebastianLuther <AT> gmx <DOT> de> |
3 |
AuthorDate: Fri Jan 24 09:06:21 2014 +0000 |
4 |
Commit: Sebastian Luther <SebastianLuther <AT> gmx <DOT> de > |
5 |
CommitDate: Wed Feb 5 19:39:21 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ae2103b5 |
7 |
|
8 |
Replace _slot_collision_nodes with _package_tracker |
9 |
|
10 |
--- |
11 |
pym/_emerge/depgraph.py | 16 +++++++--------- |
12 |
1 file changed, 7 insertions(+), 9 deletions(-) |
13 |
|
14 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
15 |
index 484ac14..1bb086b 100644 |
16 |
--- a/pym/_emerge/depgraph.py |
17 |
+++ b/pym/_emerge/depgraph.py |
18 |
@@ -378,9 +378,6 @@ class _dynamic_depgraph_config(object): |
19 |
# This use used to check if we have accounted for blockers |
20 |
# relevant to a package. |
21 |
self._traversed_pkg_deps = set() |
22 |
- # Slot collision nodes are not allowed to block other packages since |
23 |
- # blocker validation is only able to account for one package per slot. |
24 |
- self._slot_collision_nodes = set() |
25 |
self._parent_atoms = {} |
26 |
self._slot_conflict_handler = None |
27 |
self._circular_dependency_handler = None |
28 |
@@ -1799,11 +1796,16 @@ class depgraph(object): |
29 |
buildpkgonly = "--buildpkgonly" in self._frozen_config.myopts |
30 |
nodeps = "--nodeps" in self._frozen_config.myopts |
31 |
if dep.blocker: |
32 |
+ |
33 |
+ # Slot collision nodes are not allowed to block other packages since |
34 |
+ # blocker validation is only able to account for one package per slot. |
35 |
+ is_slot_conflict_parent = any(dep.parent in conflict.pkgs[1:] for conflict in \ |
36 |
+ self._dynamic_config._package_tracker.slot_conflicts()) |
37 |
if not buildpkgonly and \ |
38 |
not nodeps and \ |
39 |
not dep.collapsed_priority.ignored and \ |
40 |
not dep.collapsed_priority.optional and \ |
41 |
- dep.parent not in self._dynamic_config._slot_collision_nodes: |
42 |
+ not is_slot_conflict_parent: |
43 |
if dep.parent.onlydeps: |
44 |
# It's safe to ignore blockers if the |
45 |
# parent is an --onlydeps node. |
46 |
@@ -2019,7 +2021,6 @@ class depgraph(object): |
47 |
level=logging.DEBUG, noiselevel=-1) |
48 |
|
49 |
else: |
50 |
- self._add_slot_conflict(pkg) |
51 |
if debug: |
52 |
writemsg_level( |
53 |
"%s%s %s\n" % ("Slot Conflict:".ljust(15), |
54 |
@@ -2138,9 +2139,6 @@ class depgraph(object): |
55 |
self._dynamic_config._slot_operator_deps[slot_key] = slot_info |
56 |
slot_info.append(dep) |
57 |
|
58 |
- def _add_slot_conflict(self, pkg): |
59 |
- self._dynamic_config._slot_collision_nodes.add(pkg) |
60 |
- |
61 |
def _add_pkg_deps(self, pkg, allow_unsatisfied=False): |
62 |
|
63 |
myroot = pkg.root |
64 |
@@ -6019,7 +6017,7 @@ class depgraph(object): |
65 |
|
66 |
if "complete" not in self._dynamic_config.myparams and \ |
67 |
self._dynamic_config._allow_backtracking and \ |
68 |
- self._dynamic_config._slot_collision_nodes and \ |
69 |
+ any(self._dynamic_config._package_tracker.slot_conflicts()) and \ |
70 |
not self._accept_blocker_conflicts(): |
71 |
self._dynamic_config.myparams["complete"] = True |