public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [gentoo-portage-dev] [PATCH] _solve_..slot_conflicts: make "forced" set recursive (bug 632210)
  @ 2017-09-29 13:16 99% ` Brian Dolbec
  0 siblings, 0 replies; 1+ results
From: Brian Dolbec @ 2017-09-29 13:16 UTC (permalink / raw
  To: gentoo-portage-dev

On Fri, 29 Sep 2017 00:26:01 -0700
Zac Medico <zmedico@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>



^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2017-09-29  7:26     [gentoo-portage-dev] [PATCH] _solve_..slot_conflicts: make "forced" set recursive (bug 632210) Zac Medico
2017-09-29 13:16 99% ` Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox