On Fri, 29 Sep 2017 00:26:01 -0700
Zac Medico <zmed...@gentoo.org> wrote:

> When the slot conflict solver decides that it is "forced"
> to choose a particular package, recursively force the
> dependencies as well. Prior to this fix, substitution of
> @world in the arguments for SlotConflictMaskUpdateTestCase
> caused the test to fail because the solver removed
> boost-build-1.53.0 from the graph event though it had
> added the parent boost-1.53.0 package to the "forced"
> set.
> 
> X-Gentoo-bug: 632210
> X-Gentoo-bug-url: https://bugs.gentoo.org/632210
> ---
>  pym/_emerge/depgraph.py                                 | 13
> +++++++++++++ pym/portage/tests/resolver/test_slot_conflict_update.py
> |  2 +- 2 files changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
> index 785c036b8..3b81c5c76 100644
> --- a/pym/_emerge/depgraph.py
> +++ b/pym/_emerge/depgraph.py
> @@ -1457,6 +1457,19 @@ class depgraph(object):
>  
>               # Remove 'non_conflict_node' and or_tuples from
> 'forced'. forced = set(pkg for pkg in forced if isinstance(pkg,
> Package)) +
> +             # Add dependendencies of forced packages.
> +             stack = list(forced)
> +             traversed = set()
> +             while stack:
> +                     pkg = stack.pop()
> +                     traversed.add(pkg)
> +                     for child in conflict_graph.child_nodes(pkg):
> +                             if (isinstance(child, Package) and
> +                                     child not in traversed):
> +                                     forced.add(child)
> +                                     stack.append(child)
> +
>               non_forced = set(pkg for pkg in conflict_pkgs if pkg
> not in forced) 
>               if debug:
> diff --git a/pym/portage/tests/resolver/test_slot_conflict_update.py
> b/pym/portage/tests/resolver/test_slot_conflict_update.py index
> 331e5788b..f251d01f1 100644 ---
> a/pym/portage/tests/resolver/test_slot_conflict_update.py +++
> b/pym/portage/tests/resolver/test_slot_conflict_update.py @@ -80,7
> +80,7 @@ class SlotConflictUpdateTestCase(TestCase): # this behavior
> makes SlotConflictMaskUpdateTestCase # fail.
>                       ResolverPlaygroundTestCase(
> -                             world,
> +                             ['@world'],
>                               all_permutations = True,
>                               options = {"--update": True,
> "--deep": True}, success = True,

looks good

-- 
Brian Dolbec <dolsen>


Reply via email to