Gentoo Archives: gentoo-user

From: Jure Varlec <exzombie@×××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Unwanted dependecies
Date: Fri, 23 Jun 2006 12:43:55
Message-Id: 200606231435.18358.exzombie@exzombie.homeip.net
1 Hello,
2
3 I apologize if this was previously discussed, but I couldn't find anything on
4 gmane. And maybe I should post this on gentoo-devel, but I'm not going to
5 molest developers until I understand portage better. Knowing there are users
6 here with good knowledge of portage I thought I would ask here first.
7
8 For the past two weeks, I have been removing pieces of gnome from my system. I
9 never used it, but some libraries and programs found their way in by being
10 dependencies of some stuff I used (I'm especially angry with myself for not
11 noticing I had openoffice compiled with USE="eds"). So I used
12 second-to-the-next-best-thing-after-sliced-bread: equery. Great tool. A tad
13 slow, but it gets the job done. When I asked it to show me which packages
14 depended on a certain gnome lib, it dutifully presented me with the answer.
15 The trick is, those packages were compiled with USE="-gnome". And looking at
16 their ebuilds, dependency handling was correct and they did not depend on
17 those libs.
18
19 So portage never built this packages with gnome support. So why did they
20 depend on gnome libs? I now believe that the libs were installed prior to the
21 package in question, and the package's configure script detected that and
22 compiled the package against the lib. This may be wrong; in that case,
23 someone please explain what's going on. But if it's true, it raises two more
24 questions.
25
26 Firstly, looking at /usr/bin/equery, it seems it uses portage and gentoolkit
27 magic to extract package dependencies. I don't have enough time and python-fu
28 to fight my way through all of the code, there's way too much stuff in all
29 the modules imported. But I'd like to know: how, in principle, does equery
30 (and, supposedly, portage) know that a certain package depends on a lib, when
31 the decision to depend on it was made by the configure script independent of
32 what portage was told to do via USE flags or hard dependencies?
33
34 And secondly: why the heck does portage allow configure autodetection? Why
35 don't ebuilds specify explicitly, depending on USE flags, what to build and
36 what not to build?
37
38 And to finish the story, I played around with equery long enough to find
39 everything I deemed to be part of gnome, removed it, and rebuilt everything
40 that was unjustly depending on it. Without changing the USE flags, of
41 course -- they've never been set anyway. Emerge never pulled anything back
42 in, and now everything works beautifully, telling me I am right at least in
43 some respects. But I'd like to have the situation cleared up, so I'm turning
44 to you.
45
46 Thank you
47 Jure

Replies

Subject Author
Re: [gentoo-user] Unwanted dependecies "Bo Ørsted Andresen" <bo.andresen@××××.dk>