commit:     ef66aab178180288132177011ad0e910fb2cd55e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 21 03:19:01 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jan 23 05:52:43 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=ef66aab1

dep_zapdeps: break more buildtime cycles (bug 705986)

Buildtime cycle breaking was not enabled in cases where
the all_in_graph variable was False, and this prevented the
pypy / pypy-exe dependency cycle from being broken as shown
in the test case for bug 705986. In order to break more
buildtime cycles, enable cycle breaking regardless of the
state of the all_in_graph variable.

Bug: https://bugs.gentoo.org/705986
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/dep/dep_check.py                        |  5 ++---
 lib/portage/tests/resolver/test_circular_choices.py | 14 ++++----------
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/lib/portage/dep/dep_check.py b/lib/portage/dep/dep_check.py
index 3a0c7bbe9..321d961dd 100644
--- a/lib/portage/dep/dep_check.py
+++ b/lib/portage/dep/dep_check.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2018 Gentoo Foundation
+# Copyright 2010-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -570,8 +570,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, 
trees=None,
                                circular_atom = None
                                if not (parent is None or priority is None) and 
\
                                        (parent.onlydeps or
-                                       (all_in_graph and priority.buildtime and
-                                       not (priority.satisfied or 
priority.optional))):
+                                       (priority.buildtime and not 
priority.satisfied and not priority.optional)):
                                                # Check if the atom would 
result in a direct circular
                                                # dependency and try to avoid 
that if it seems likely
                                                # to be unresolvable. This is 
only relevant for

diff --git a/lib/portage/tests/resolver/test_circular_choices.py 
b/lib/portage/tests/resolver/test_circular_choices.py
index 968677a46..a383519fc 100644
--- a/lib/portage/tests/resolver/test_circular_choices.py
+++ b/lib/portage/tests/resolver/test_circular_choices.py
@@ -1,4 +1,4 @@
-# Copyright 2011-2019 Gentoo Authors
+# Copyright 2011-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from portage.tests import TestCase
@@ -184,17 +184,11 @@ class CircularPypyExeTestCase(TestCase):
                }
 
                test_cases = (
-                       # Demonstrate bug 705986, where a USE change suggestion 
is given
-                       # even though an || preference adjustment is available.
+                       # Demonstrate bug 705986, where a USE change suggestion 
was given
+                       # even though an || preference adjustment would solve 
the problem
+                       # by pulling in pypy-exe-bin instead of pypy-exe.
                        ResolverPlaygroundTestCase(
                                ['dev-python/pypy'],
-                               circular_dependency_solutions = 
{'dev-python/pypy-7.3.0': {frozenset({('low-memory', True)})}},
-                               success = False,
-                       ),
-                       # Demonstrate explicit pypy-exe-bin argument used as a 
workaround
-                       # for bug 705986.
-                       ResolverPlaygroundTestCase(
-                               ['dev-python/pypy', 'dev-python/pypy-exe-bin'],
                                mergelist=['dev-python/pypy-exe-bin-7.3.0', 
'dev-python/pypy-7.3.0'],
                                success = True,
                        ),

Reply via email to