1 |
Le 28/12/2009 22:04, Fabio Erculiani a écrit : |
2 |
> On Mon, Dec 28, 2009 at 9:51 PM, David Leverton |
3 |
> <levertond@××××××××××.com> wrote: |
4 |
>> On Monday 28 December 2009 20:50:17 Fabio Erculiani wrote: |
5 |
>>> What all this has to do with the fact that they are just build |
6 |
>>> dependencies? Just wondering. |
7 |
>> |
8 |
>> They're not just build dependencies. They're required to use the library in a |
9 |
>> certain way, namely to compile other programs against it. As long as we |
10 |
>> don't have compile-against dependencies, the only correct way to express that |
11 |
>> is RDEPEND (and also DEPEND because they're /also/ needed to build the |
12 |
>> library itself). |
13 |
> |
14 |
> To me you are saying that DEPEND would work just fine. No? |
15 |
|
16 |
No, but I understand why you're insisting. It took us a few weeks to |
17 |
wrap our heads around this to understand it. |
18 |
|
19 |
Let's take an example (bug #228211 but there are dozens more). |
20 |
|
21 |
In this example, libfakekey does : #include <XTest.h> |
22 |
|
23 |
and its configure.ac checks for "xtst.pc". Both files are provided by |
24 |
x11-libs/libXtst so this dep is added to DEPEND and RDEPEND. |
25 |
|
26 |
The problem comes from libXtst's XTest.h which #includes <XInput.h> |
27 |
which was provided by x11-proto/inputproto [1]. |
28 |
|
29 |
inputproto is/was a build-time dep of libXtst. |
30 |
- libXtst _directly_ requires inputproto at build-time only |
31 |
- libXtst _directly_ requires libXi at build-time and run-time |
32 |
|
33 |
However : |
34 |
- requiring libXtst at build-time _also_ requires inputproto. |
35 |
|
36 |
For most users out there, this would never be a problem since most |
37 |
Gentoo users always keep build-time deps on their systems. |
38 |
|
39 |
The problem arises for people who only keep run-time deps, usually for |
40 |
binary packages. inputproto being a DEPEND-only dep of libXtst, binary |
41 |
users will never get inputproto when they build libfakekey. |
42 |
|
43 |
So there were 3 solutions : |
44 |
|
45 |
1) add explicit deps in _all_ packages that DEPEND on libXtst to _also_ |
46 |
depend on inputproto even if they don't use it at all (most don't, they |
47 |
just use XTest functions). |
48 |
|
49 |
2) add inputproto to libXtst's DEPEND and RDEPEND |
50 |
|
51 |
3) modify EAPI to add a new *DEPEND variable to cater X's very special |
52 |
needs. |
53 |
|
54 |
Solution #1 is error prone. If we "fix" ebuilds now, new ebuilds might |
55 |
pop up later with "broken" dependencies. No go. |
56 |
|
57 |
Solution #3 really isn't for me. I tried getting near PMS and I got bit. |
58 |
If anyone wants to do this, I'll help, but I won't do this on my own. |
59 |
|
60 |
So we went with solution #2. Yes, it does add nasty little headers on a |
61 |
binary distribution, but that was a far better compromise than any of |
62 |
the other 2 solutions. |
63 |
|
64 |
Really, the correct solution (please _listen_ and _trust_ me on this) is |
65 |
to add a new dependency variable to EAPI to correctly describe how X |
66 |
headers and libs really work. That's solution #3. I agree with you, |
67 |
pulling protos in both DEPEND and RDEPEND is a hack, but it's *much* |
68 |
better than the other alternatives. |
69 |
|
70 |
Rémi |
71 |
|
72 |
[1] This file is now part of libXi, but the problem has now shifted to |
73 |
XI.h, so it's still going to be the exact same problem today, but for |
74 |
the sake of simplicity, I'll keep it short. |