Gentoo Archives: gentoo-dev

From: Henry Gebhardt <hsggebhardt@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] x11-libs/lib*: wrong RDEPENDs bug
Date: Tue, 29 Dec 2009 13:44:30
Message-Id: 20091229144325.1efc1d63@googlemail.com
In Reply to: Re: [gentoo-dev] x11-libs/lib*: wrong RDEPENDs bug by "Rémi Cardona"
1 On Mon, 28 Dec 2009 23:31:44 +0100
2 Rémi Cardona <remi@g.o> wrote:
3
4 > Le 28/12/2009 22:04, Fabio Erculiani a écrit :
5 > > On Mon, Dec 28, 2009 at 9:51 PM, David Leverton
6 > > <levertond@××××××××××.com> wrote:
7 > >> On Monday 28 December 2009 20:50:17 Fabio Erculiani wrote:
8 > >>> What all this has to do with the fact that they are just
9 > >>> build dependencies? Just wondering.
10 > >>
11 > >> They're not just build dependencies. They're required to
12 > >> use the library in a certain way, namely to compile other
13 > >> programs against it. As long as we don't have
14 > >> compile-against dependencies, the only correct way to
15 > >> express that is RDEPEND (and also DEPEND because
16 > >> they're /also/ needed to build the library itself).
17 > >
18 > > To me you are saying that DEPEND would work just fine. No?
19 >
20 > No, but I understand why you're insisting. It took us a few
21 > weeks to wrap our heads around this to understand it.
22 >
23 > Let's take an example (bug #228211 but there are dozens more).
24 >
25 > In this example, libfakekey does : #include <XTest.h>
26 >
27 > and its configure.ac checks for "xtst.pc". Both files are
28 > provided by x11-libs/libXtst so this dep is added to DEPEND and
29 > RDEPEND.
30 >
31 > The problem comes from libXtst's XTest.h which #includes
32 > <XInput.h> which was provided by x11-proto/inputproto [1].
33 >
34 > inputproto is/was a build-time dep of libXtst.
35 > - libXtst _directly_ requires inputproto at build-time only
36 > - libXtst _directly_ requires libXi at build-time and run-time
37 >
38 > However :
39 > - requiring libXtst at build-time _also_ requires inputproto.
40 >
41 > For most users out there, this would never be a problem since
42 > most Gentoo users always keep build-time deps on their systems.
43 >
44 > The problem arises for people who only keep run-time deps,
45 > usually for binary packages. inputproto being a DEPEND-only dep
46 > of libXtst, binary users will never get inputproto when they
47 > build libfakekey.
48 >
49 > So there were 3 solutions :
50 >
51 > 1) add explicit deps in _all_ packages that DEPEND on libXtst
52 > to _also_ depend on inputproto even if they don't use it at all
53 > (most don't, they just use XTest functions).
54 >
55 > 2) add inputproto to libXtst's DEPEND and RDEPEND
56 >
57 > 3) modify EAPI to add a new *DEPEND variable to cater X's very
58 > special needs.
59
60 Isn't there a fourth solution?
61
62 4) add a USE-flag, say "devel", that, when enabled, allows
63 compiling programs against the package. x11-libs/libXtst would
64 have an RDEPEND like this:
65 RDEPEND="devel? x11-libs/inputproto"
66
67 Anything wrong with that?
68
69 ~H

Replies

Subject Author
Re: [gentoo-dev] x11-libs/lib*: wrong RDEPENDs bug "Rémi Cardona" <remi@g.o>