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