Hello, I apologize if this was previously discussed, but I couldn't find anything on gmane. And maybe I should post this on gentoo-devel, but I'm not going to molest developers until I understand portage better. Knowing there are users here with good knowledge of portage I thought I would ask here first.
For the past two weeks, I have been removing pieces of gnome from my system. I never used it, but some libraries and programs found their way in by being dependencies of some stuff I used (I'm especially angry with myself for not noticing I had openoffice compiled with USE="eds"). So I used second-to-the-next-best-thing-after-sliced-bread: equery. Great tool. A tad slow, but it gets the job done. When I asked it to show me which packages depended on a certain gnome lib, it dutifully presented me with the answer. The trick is, those packages were compiled with USE="-gnome". And looking at their ebuilds, dependency handling was correct and they did not depend on those libs. So portage never built this packages with gnome support. So why did they depend on gnome libs? I now believe that the libs were installed prior to the package in question, and the package's configure script detected that and compiled the package against the lib. This may be wrong; in that case, someone please explain what's going on. But if it's true, it raises two more questions. Firstly, looking at /usr/bin/equery, it seems it uses portage and gentoolkit magic to extract package dependencies. I don't have enough time and python-fu to fight my way through all of the code, there's way too much stuff in all the modules imported. But I'd like to know: how, in principle, does equery (and, supposedly, portage) know that a certain package depends on a lib, when the decision to depend on it was made by the configure script independent of what portage was told to do via USE flags or hard dependencies? And secondly: why the heck does portage allow configure autodetection? Why don't ebuilds specify explicitly, depending on USE flags, what to build and what not to build? And to finish the story, I played around with equery long enough to find everything I deemed to be part of gnome, removed it, and rebuilt everything that was unjustly depending on it. Without changing the USE flags, of course -- they've never been set anyway. Emerge never pulled anything back in, and now everything works beautifully, telling me I am right at least in some respects. But I'd like to have the situation cleared up, so I'm turning to you. Thank you Jure
pgpsfQPNeT8yw.pgp
Description: PGP signature