Gentoo Archives: gentoo-commits

From: Sebastian Luther <SebastianLuther@×××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/
Date: Sun, 08 Jun 2014 11:06:30
Message-Id: 1402225314.057aba82c112c3933560d83d20fcfc971fc471da.few@gentoo
1 commit: 057aba82c112c3933560d83d20fcfc971fc471da
2 Author: Sebastian Luther <SebastianLuther <AT> gmx <DOT> de>
3 AuthorDate: Sun Jun 8 11:01:54 2014 +0000
4 Commit: Sebastian Luther <SebastianLuther <AT> gmx <DOT> de >
5 CommitDate: Sun Jun 8 11:01:54 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=057aba82
7
8 More debug output for the slot conflict handler
9
10 ---
11 pym/_emerge/depgraph.py | 28 ++++++++++++++++++++++++++--
12 1 file changed, 26 insertions(+), 2 deletions(-)
13
14 diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
15 index 28d4026..4acb114 100644
16 --- a/pym/_emerge/depgraph.py
17 +++ b/pym/_emerge/depgraph.py
18 @@ -990,6 +990,11 @@ class depgraph(object):
19 if not conflicts:
20 return
21
22 + if debug:
23 + writemsg_level(
24 + "\n!!! Slot conflict handler started.\n",
25 + level=logging.DEBUG, noiselevel=-1)
26 +
27 # Get a set of all conflicting packages.
28 conflict_pkgs = set()
29 for conflict in conflicts:
30 @@ -1044,6 +1049,13 @@ class depgraph(object):
31 return "(%s)" % ",".join(str(pkg) for pkg in self)
32
33 for conflict in conflicts:
34 + if debug:
35 + writemsg_level(" conflict:\n", level=logging.DEBUG, noiselevel=-1)
36 + writemsg_level(" root: %s\n" % conflict.root, level=logging.DEBUG, noiselevel=-1)
37 + writemsg_level(" atom: %s\n" % conflict.atom, level=logging.DEBUG, noiselevel=-1)
38 + for pkg in conflict:
39 + writemsg_level(" pkg: %s\n" % pkg, level=logging.DEBUG, noiselevel=-1)
40 +
41 all_parent_atoms = set()
42 for pkg in conflict:
43 all_parent_atoms.update(
44 @@ -1051,9 +1063,16 @@ class depgraph(object):
45
46 for parent, atom in all_parent_atoms:
47 is_arg_parent = isinstance(parent, AtomArg)
48 + is_non_conflict_parent = parent not in conflict_pkgs and \
49 + parent not in indirect_conflict_pkgs
50
51 - if parent not in conflict_pkgs and \
52 - parent not in indirect_conflict_pkgs:
53 + if debug:
54 + writemsg_level(" parent: %s\n" % parent, level=logging.DEBUG, noiselevel=-1)
55 + writemsg_level(" arg, non-conflict: %s, %s\n" % (is_arg_parent, is_non_conflict_parent),
56 + level=logging.DEBUG, noiselevel=-1)
57 + writemsg_level(" atom: %s\n" % atom, level=logging.DEBUG, noiselevel=-1)
58 +
59 + if is_non_conflict_parent:
60 parent = non_conflict_node
61
62 atom_set = InternalPackageSet(
63 @@ -1065,6 +1084,11 @@ class depgraph(object):
64 modified_use=self._pkg_use_enabled(pkg)) and \
65 not (is_arg_parent and pkg.installed):
66 matched.append(pkg)
67 +
68 + if debug:
69 + for match in matched:
70 + writemsg_level(" match: %s\n" % match, level=logging.DEBUG, noiselevel=-1)
71 +
72 if len(matched) == len(conflict):
73 # All packages match.
74 continue