On Friday 23 June 2006 14:35, Jure Varlec wrote:
> 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.

Good call. :)

[SNIP]
> 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.

How did you determine that? Did the ebuild inherit any eclasses and did you 
look in those? Also make sure you have >=gentoolkit-0.2.2.

> 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.

Remember USE flags are for *optional* dependencies. Mandatory dependencies 
will remain no matter what USE flags you set.

[SNIP]
> 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?

The decision should not be made independent of what portage was told. If it is 
that would be a bug in the ebuild.

> 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?

It does specify dependencies explicitly in the ebuilds depending on USE flags. 
If it does not it is a bug.

> 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.

Portage cannot prevent an autoconfigure script from detecting stuff that the 
ebuild does not depend on. But as stated above it would be regarded as a bug 
when it does. The devs have two options to fix such a bug. Either patch the 
configure script to disable detection of additional stuff (when USE flag is 
disabled) or add the detected stuff as mandatory dependencies.

This also explains why applications that depend on gnome-python-extras like 
e.g. meld have ridiculous dependencies like totem and nautilus-burner. To get 
rid of those dependencies someone must patch the configure script of 
gnome-python-extras to allow USE flags to disable them with switches.

HtH

-- 
Bo Andresen

Attachment: pgpe3bA3VEtkC.pgp
Description: PGP signature

Reply via email to