1 |
----- Zac Medico <zmedico@g.o> a écrit : |
2 |
> It's capable of considering older versions, but maybe there's some |
3 |
> deficiency in the algorithm. We should analyze a specific example in |
4 |
> order to understand the behavior. |
5 |
> |
6 |
> Maybe you're referring to this code which forces the highest version in |
7 |
> the event of a conflict: |
8 |
> |
9 |
> https://gitweb.gentoo.org/proj/portage.git/commit/?id=a9064d08ef4c92a5d0d1bfb3dc8a01b7850812b0 |
10 |
> |
11 |
|
12 |
Yes, this seems to be the cause of the problem, thank you. |
13 |
|
14 |
For testing, I created two ebuilds (and tested with "emerge -pv --autounmask-backtrack y net-misc/pdepa"): |
15 |
|
16 |
## net-misc/pdepa-1.0 |
17 |
EAPI=6 |
18 |
KEYWORDS="amd64" |
19 |
SLOT="1" |
20 |
IUSE="feature" |
21 |
REQUIRED_USE="" |
22 |
DEPEND="" |
23 |
|
24 |
## net-misc/pdepa-2.0 |
25 |
EAPI=6 |
26 |
KEYWORDS="amd64" |
27 |
SLOT="1" |
28 |
IUSE="feature" |
29 |
REQUIRED_USE="^^ ( feature )" # feature is not set => not installable |
30 |
DEPEND="" |
31 |
|
32 |
Like you said, due to SLOT conflict, only net-misc/pdepa-2.0 is tried, and emerge fails. |
33 |
Changing the SLOT of net-misc/pdepa-2.0 to 2 "solves the issue": emerge succeeds and propose to install net-misc/pdepa-1.0 |
34 |
|
35 |
However, this solution is only local: if in net-misc/pdepa-2.0 I replace |
36 |
REQUIRED_USE="" # now the package has no configuration problem |
37 |
DEPEND="!virtual/libc" # but it conflicts with an important library |
38 |
|
39 |
then emerge fails again, saying that virtual/libc blocks net-misc/pdepa-2.0 |
40 |
|
41 |
|
42 |
I don't know how many actual packages cannot be installed due to this optimization. |
43 |
I noticed this behavior in a previous version of the portage tree, when trying to install sys-auth/polkit without configuring it: |
44 |
- old version: REQUIRED_USE="??( systemd consolekit )" |
45 |
- more recent version REQUIRED_USE="^^ ( consolekit, elogind systemd )" |
46 |
In practice however, this was not a problem, as some dependencies of polkit deep in the tree did require one of ( systemd consolekit ) to be set. |
47 |
|
48 |
If you want, I can implement a test that check if this optimization is a problem in practice. |
49 |
Checking the issue shouldn't be too difficult (I think I just need to check that all REQUIRED_USE and *DEPEND are equivalent for a SLOT). |
50 |
|
51 |
Best, |
52 |
Michael |