1 |
Buildtime cycle breaking was not enabled in cases where |
2 |
the all_in_graph variable was False, and this prevented the |
3 |
pypy / pypy-exe dependency cycle from being broken as shown |
4 |
in the test case for bug 705986. In order to break more |
5 |
buildtime cycles, enable cycle breaking regardless of the |
6 |
state of the all_in_graph variable. |
7 |
|
8 |
Bug: https://bugs.gentoo.org/705986 |
9 |
Signed-off-by: Zac Medico <zmedico@g.o> |
10 |
--- |
11 |
lib/portage/dep/dep_check.py | 5 ++--- |
12 |
.../tests/resolver/test_circular_choices.py | 14 ++++---------- |
13 |
2 files changed, 6 insertions(+), 13 deletions(-) |
14 |
|
15 |
diff --git a/lib/portage/dep/dep_check.py b/lib/portage/dep/dep_check.py |
16 |
index 3a0c7bbe9..321d961dd 100644 |
17 |
--- a/lib/portage/dep/dep_check.py |
18 |
+++ b/lib/portage/dep/dep_check.py |
19 |
@@ -1,4 +1,4 @@ |
20 |
-# Copyright 2010-2018 Gentoo Foundation |
21 |
+# Copyright 2010-2020 Gentoo Authors |
22 |
# Distributed under the terms of the GNU General Public License v2 |
23 |
|
24 |
from __future__ import unicode_literals |
25 |
@@ -570,8 +570,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None, |
26 |
circular_atom = None |
27 |
if not (parent is None or priority is None) and \ |
28 |
(parent.onlydeps or |
29 |
- (all_in_graph and priority.buildtime and |
30 |
- not (priority.satisfied or priority.optional))): |
31 |
+ (priority.buildtime and not priority.satisfied and not priority.optional)): |
32 |
# Check if the atom would result in a direct circular |
33 |
# dependency and try to avoid that if it seems likely |
34 |
# to be unresolvable. This is only relevant for |
35 |
diff --git a/lib/portage/tests/resolver/test_circular_choices.py b/lib/portage/tests/resolver/test_circular_choices.py |
36 |
index 968677a46..a383519fc 100644 |
37 |
--- a/lib/portage/tests/resolver/test_circular_choices.py |
38 |
+++ b/lib/portage/tests/resolver/test_circular_choices.py |
39 |
@@ -1,4 +1,4 @@ |
40 |
-# Copyright 2011-2019 Gentoo Authors |
41 |
+# Copyright 2011-2020 Gentoo Authors |
42 |
# Distributed under the terms of the GNU General Public License v2 |
43 |
|
44 |
from portage.tests import TestCase |
45 |
@@ -184,17 +184,11 @@ class CircularPypyExeTestCase(TestCase): |
46 |
} |
47 |
|
48 |
test_cases = ( |
49 |
- # Demonstrate bug 705986, where a USE change suggestion is given |
50 |
- # even though an || preference adjustment is available. |
51 |
+ # Demonstrate bug 705986, where a USE change suggestion was given |
52 |
+ # even though an || preference adjustment would solve the problem |
53 |
+ # by pulling in pypy-exe-bin instead of pypy-exe. |
54 |
ResolverPlaygroundTestCase( |
55 |
['dev-python/pypy'], |
56 |
- circular_dependency_solutions = {'dev-python/pypy-7.3.0': {frozenset({('low-memory', True)})}}, |
57 |
- success = False, |
58 |
- ), |
59 |
- # Demonstrate explicit pypy-exe-bin argument used as a workaround |
60 |
- # for bug 705986. |
61 |
- ResolverPlaygroundTestCase( |
62 |
- ['dev-python/pypy', 'dev-python/pypy-exe-bin'], |
63 |
mergelist=['dev-python/pypy-exe-bin-7.3.0', 'dev-python/pypy-7.3.0'], |
64 |
success = True, |
65 |
), |
66 |
-- |
67 |
2.24.1 |