1 |
commit: 2366c903bab8f44463106e878f4e0c1ba81f42f8 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 19 04:17:50 2017 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 20 19:39:00 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2366c903 |
7 |
|
8 |
depgraph._in_blocker_conflict: call _validate_blockers if needed (bug 615982) |
9 |
|
10 |
Sometimes _complete_graph calls _slot_operator_update_probe, which |
11 |
sometimes calls _in_blocker_conflict. This case occurs infrequently, |
12 |
so call _validate_blockers only if needed. |
13 |
|
14 |
Fixes: a83bb83909c5 ("depgraph: trigger slot operator rebuilds via _complete_graph (bug 614390)") |
15 |
X-Gentoo-bug: 615982 |
16 |
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=615982 |
17 |
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org> |
18 |
|
19 |
pym/_emerge/depgraph.py | 15 +++++++++++---- |
20 |
1 file changed, 11 insertions(+), 4 deletions(-) |
21 |
|
22 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
23 |
index 3232816d5..e1119af3c 100644 |
24 |
--- a/pym/_emerge/depgraph.py |
25 |
+++ b/pym/_emerge/depgraph.py |
26 |
@@ -2176,9 +2176,9 @@ class depgraph(object): |
27 |
only works after the _validate_blockers method has been called. |
28 |
""" |
29 |
|
30 |
- if self._dynamic_config._blocked_pkgs is None: |
31 |
- raise AssertionError( |
32 |
- '_in_blocker_conflict called before _validate_blockers') |
33 |
+ if (self._dynamic_config._blocked_pkgs is None |
34 |
+ and not self._validate_blockers()): |
35 |
+ raise self._unknown_internal_error() |
36 |
|
37 |
if pkg in self._dynamic_config._blocked_pkgs: |
38 |
return True |
39 |
@@ -6728,7 +6728,14 @@ class depgraph(object): |
40 |
packages within the graph. If necessary, create hard deps to ensure |
41 |
correct merge order such that mutually blocking packages are never |
42 |
installed simultaneously. Also add runtime blockers from all installed |
43 |
- packages if any of them haven't been added already (bug 128809).""" |
44 |
+ packages if any of them haven't been added already (bug 128809). |
45 |
+ |
46 |
+ Normally, this method is called only after the graph is complete, and |
47 |
+ after _solve_non_slot_operator_slot_conflicts has had an opportunity |
48 |
+ to solve slot conflicts (possibly removing some blockers). It can also |
49 |
+ be called earlier, in order to get a preview of the blocker data, but |
50 |
+ then it needs to be called again after the graph is complete. |
51 |
+ """ |
52 |
|
53 |
# The _in_blocker_conflict method needs to assert that this method |
54 |
# has been called before it, by checking that it is not None. |