1 |
And yet another resolver bug: |
2 |
|
3 |
Bug 419381 - sys-apps/portage-2.2.0_alpha109: emerge autounmask comment |
4 |
shows confusing "required by" dependency graph |
5 |
|
6 |
|
7 |
The problem here is as follows: |
8 |
|
9 |
Assume there are three packages A, B and X on a stable system. |
10 |
|
11 |
A has DEPEND="X" |
12 |
B has DEPEND=">=X-2" |
13 |
|
14 |
X-1 is stable, X-2 is not. |
15 |
|
16 |
If the user tries to install A and B at the same time, emerge will |
17 |
detect that X-2 needs to be keyworded. So far so good. |
18 |
|
19 |
When it prints the autounmask message, it prints these "required by" |
20 |
messages. It does so by traversing the dependency graph upwards. The |
21 |
problem is with the choice of the parent of the keyworded package. |
22 |
|
23 |
In the example above you want that to be B, because B is what makes X-2 |
24 |
necessary. A could just live with the stable X-1. |
25 |
|
26 |
But there is no logic to check for this. It just picks a random parent. |
27 |
|
28 |
To solve this bug, you'll need to look at the following functions in the |
29 |
depgraph class: |
30 |
|
31 |
_display_autounmask |
32 |
_get_dep_chain_as_comment |
33 |
_get_dep_chain |
34 |
|
35 |
The logic will probably be implemented in _get_dep_chain, but the other |
36 |
function may have to pass more information down to it. |
37 |
|
38 |
Note that this problem does not only affect keywording, but all other |
39 |
things supported by --autounmask. |