1 |
On Fri, 29 Sep 2017 00:26:01 -0700 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> When the slot conflict solver decides that it is "forced" |
5 |
> to choose a particular package, recursively force the |
6 |
> dependencies as well. Prior to this fix, substitution of |
7 |
> @world in the arguments for SlotConflictMaskUpdateTestCase |
8 |
> caused the test to fail because the solver removed |
9 |
> boost-build-1.53.0 from the graph event though it had |
10 |
> added the parent boost-1.53.0 package to the "forced" |
11 |
> set. |
12 |
> |
13 |
> X-Gentoo-bug: 632210 |
14 |
> X-Gentoo-bug-url: https://bugs.gentoo.org/632210 |
15 |
> --- |
16 |
> pym/_emerge/depgraph.py | 13 |
17 |
> +++++++++++++ pym/portage/tests/resolver/test_slot_conflict_update.py |
18 |
> | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) |
19 |
> |
20 |
> diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
21 |
> index 785c036b8..3b81c5c76 100644 |
22 |
> --- a/pym/_emerge/depgraph.py |
23 |
> +++ b/pym/_emerge/depgraph.py |
24 |
> @@ -1457,6 +1457,19 @@ class depgraph(object): |
25 |
> |
26 |
> # Remove 'non_conflict_node' and or_tuples from |
27 |
> 'forced'. forced = set(pkg for pkg in forced if isinstance(pkg, |
28 |
> Package)) + |
29 |
> + # Add dependendencies of forced packages. |
30 |
> + stack = list(forced) |
31 |
> + traversed = set() |
32 |
> + while stack: |
33 |
> + pkg = stack.pop() |
34 |
> + traversed.add(pkg) |
35 |
> + for child in conflict_graph.child_nodes(pkg): |
36 |
> + if (isinstance(child, Package) and |
37 |
> + child not in traversed): |
38 |
> + forced.add(child) |
39 |
> + stack.append(child) |
40 |
> + |
41 |
> non_forced = set(pkg for pkg in conflict_pkgs if pkg |
42 |
> not in forced) |
43 |
> if debug: |
44 |
> diff --git a/pym/portage/tests/resolver/test_slot_conflict_update.py |
45 |
> b/pym/portage/tests/resolver/test_slot_conflict_update.py index |
46 |
> 331e5788b..f251d01f1 100644 --- |
47 |
> a/pym/portage/tests/resolver/test_slot_conflict_update.py +++ |
48 |
> b/pym/portage/tests/resolver/test_slot_conflict_update.py @@ -80,7 |
49 |
> +80,7 @@ class SlotConflictUpdateTestCase(TestCase): # this behavior |
50 |
> makes SlotConflictMaskUpdateTestCase # fail. |
51 |
> ResolverPlaygroundTestCase( |
52 |
> - world, |
53 |
> + ['@world'], |
54 |
> all_permutations = True, |
55 |
> options = {"--update": True, |
56 |
> "--deep": True}, success = True, |
57 |
|
58 |
looks good |
59 |
|
60 |
-- |
61 |
Brian Dolbec <dolsen> |