1 |
Since commit cc8724b80ec7da713baed3d3a88c0bb99fc368b7, the _too_deep |
2 |
method erroneously returned True when deep was True. When deep is True |
3 |
and depth is an int, the method is intended to return False, therefore |
4 |
fix it to do so. This fixes the dep.want_update assignment from commit |
5 |
cc8724b80ec7 to behave correctly, which solves bug 566024 because it |
6 |
corrects behavior of the _slot_operator_trigger_reinstalls method. |
7 |
|
8 |
Fixes: cc8724b80ec7 ("depgraph._want_update_pkg: handle _UNREACHABLE_DEPTH (bug 554928)") |
9 |
X-Gentoo-Bug: 566024 |
10 |
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=566024 |
11 |
--- |
12 |
pym/_emerge/depgraph.py | 10 ++++++++-- |
13 |
1 file changed, 8 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
16 |
index fa83ae8..2169b00 100644 |
17 |
--- a/pym/_emerge/depgraph.py |
18 |
+++ b/pym/_emerge/depgraph.py |
19 |
@@ -5407,8 +5407,14 @@ class depgraph(object): |
20 |
@return: True if the package is deeper than the max allowed depth |
21 |
""" |
22 |
deep = self._dynamic_config.myparams.get("deep", 0) |
23 |
- return depth is self._UNREACHABLE_DEPTH or ( |
24 |
- isinstance(deep, int) and isinstance(depth, int) and depth > deep) |
25 |
+ if depth is self._UNREACHABLE_DEPTH: |
26 |
+ return True |
27 |
+ elif deep is True: |
28 |
+ return False |
29 |
+ else: |
30 |
+ # All non-integer cases are handled above, |
31 |
+ # so both values must be int type. |
32 |
+ return depth > deep |
33 |
|
34 |
def _depth_increment(self, depth, n=1): |
35 |
""" |
36 |
-- |
37 |
2.4.10 |