* [gentoo-user] Unwanted dependecies
@ 2006-06-23 12:35 Jure Varlec
2006-06-23 14:14 ` Bo Ørsted Andresen
0 siblings, 1 reply; 11+ messages in thread
From: Jure Varlec @ 2006-06-23 12:35 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2621 bytes --]
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
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Unwanted dependecies
2006-06-23 12:35 [gentoo-user] Unwanted dependecies Jure Varlec
@ 2006-06-23 14:14 ` Bo Ørsted Andresen
2006-06-23 15:51 ` Jure Varlec
0 siblings, 1 reply; 11+ messages in thread
From: Bo Ørsted Andresen @ 2006-06-23 14:14 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3251 bytes --]
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 #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Unwanted dependecies
2006-06-23 14:14 ` Bo Ørsted Andresen
@ 2006-06-23 15:51 ` Jure Varlec
2006-06-23 16:34 ` Neil Bothwick
2006-06-23 17:40 ` Bo Ørsted Andresen
0 siblings, 2 replies; 11+ messages in thread
From: Jure Varlec @ 2006-06-23 15:51 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 4753 bytes --]
Thank you for replying. I see now that I should clarify further what is
bothering me, as you didn't quite see my point. I guess it got lost in the
noise. No more stories then :)
>Remember USE flags are for *optional* dependencies. Mandatory dependencies
>will remain no matter what USE flags you set.
I understand. That is not the problem.
>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.
Gentoolkit is 0.2.2. After equery, I took a look at the ebuild.
As for the eclasses, I must admit I'm still not too comfortable with them,
which is what I was actually referring to when I said I need to understand
portage better. It's a shame really considering that I've been using gentoo
for two-and-a-half years. I need to get spanked ;) . But as far as I
understand it (and from what I can see looking at the eclasses) they are
merely collections of useful shell functions which devs can use when writing
ebuilds.
Anyway, to get rid of unnecessary confusion, I will give you an example
package which I remember, and whose ebuild is simple enough so that it does
not include any complicated inherits. In fact, it is short enough to be
included in this mail.
> # Copyright 1999-2006 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: /var/cvsroot/gentoo-x86/media-gfx/gqview/gqview-2.0.1.ebuild,v
> 1.8 2006/02/21 21:31:07 mr_bones_ Exp $
>
> DESCRIPTION="A GTK-based image browser"
> HOMEPAGE="http://gqview.sourceforge.net/"
> SRC_URI="mirror://sourceforge/gqview/${P}.tar.gz"
>
> LICENSE="GPL-2"
> SLOT="0"
> KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
> IUSE=""
>
> RDEPEND=">=x11-libs/gtk+-2.4.0
> virtual/libintl"
>
> DEPEND="${RDEPEND}
> sys-devel/gettext"
>
> src_install() {
> make DESTDIR="${D}" install || die "make install failed"
> # leave README uncompressed because the program reads it
> dodoc AUTHORS ChangeLog TODO
> rm -f "${D}/usr/share/doc/${PF}/COPYING"
> }
As you can see, it does not inherit anything, and does not depend on anything
gnomish. However, when I checked with equery, it definitely depended on
something which I didn't need/want (sorry, I can't remember what it was,
probably gconf or some such), although the ebuild specifies no such
dependency, not even indirectly (through gtk+ etc.) After I removed the
unwanted dep and remerged gqview, it did not pull the removed "dependency"
back in, and no longer depends on it.
The same applies for dependencies which were disabled through use flags, such
as this snip (from openoffice):
> gnome? ( >=x11-libs/gtk+-2.4
>
> >=gnome-base/gnome-vfs-2.6
> >=gnome-base/gconf-2.0 )
In this case, It depended on gnome-vfs and gconf, even when the gnome USE flag
was disabled. After I removed the offending packages and recompiled
openoffice, the dependecy is gone.
Note: you might remember I wrote that oo.org used to be compiled with
USE="eds", which pulls these in along with other stuff indirectly through
gnome-extra/evolution-data-server. It was the reason these libs were
installed in the first place. The dependency problem I'm describing, however,
is independent from that and was present even after I recompiled oo.org
without "eds".
I hope this helped you better understand what is bothering me. It's not that
I'm particularly against having those libs installed and wouldn't mind to
keep them if they were hard deps of something I needed, but I'm kind of
frustrated when packages depend on things I told them not to depend on
through USE flags. It means I cant test a package with a hard dep on a lib
because in case I emerge something while that lib is installed, I'll never
know if it will choose to depend on that lib, which in turn would mean that
after I remove the lib, I need to recompile stuff, once more. In the past two
weeks, I recompiled openoffice 4 times, which is 3 times more than I'm
normally willing to do it. This is not to say I would be less frustrated if
only small packages were affected :)
Looking at oo.org ebuild again and I see that it uses use_enable function in
the call to ./configure. So why the heck did it depend on gconf and gnome-vfs
when it was obviously told not to? And even more confusing: how did equery
know about this dependency?
*Sigh*
I hope I'm missing something here. Because if these are bugs, there's quite a
few. Sadly, I removed all the temporary lists of packages I removed and
rebuilt, so I have nothing to report now. Stupid me.
Jure
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Unwanted dependecies
2006-06-23 15:51 ` Jure Varlec
@ 2006-06-23 16:34 ` Neil Bothwick
2006-06-23 17:57 ` Bo Ørsted Andresen
2006-06-23 18:18 ` [gentoo-user] Unwanted dependecies Jure Varlec
2006-06-23 17:40 ` Bo Ørsted Andresen
1 sibling, 2 replies; 11+ messages in thread
From: Neil Bothwick @ 2006-06-23 16:34 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 716 bytes --]
On Fri, 23 Jun 2006 17:51:16 +0200, Jure Varlec wrote:
> Note: you might remember I wrote that oo.org used to be compiled with
> USE="eds", which pulls these in along with other stuff indirectly
> through gnome-extra/evolution-data-server. It was the reason these libs
> were installed in the first place. The dependency problem I'm
> describing, however, is independent from that and was present even
> after I recompiled oo.org without "eds".
How did you disable that USE flag? AIUI equery works with global USE
flags, so if emerge --info still shows eds, equery will think OOo depends
on it, no matter what you have in /etc/portage.
--
Neil Bothwick
This screen intentionally left blank.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Unwanted dependecies
2006-06-23 16:34 ` Neil Bothwick
@ 2006-06-23 17:57 ` Bo Ørsted Andresen
2006-06-23 21:16 ` [gentoo-user] Unwanted dependencies Benno Schulenberg
2006-06-23 18:18 ` [gentoo-user] Unwanted dependecies Jure Varlec
1 sibling, 1 reply; 11+ messages in thread
From: Bo Ørsted Andresen @ 2006-06-23 17:57 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]
On Friday 23 June 2006 18:34, Neil Bothwick wrote:
> AIUI equery works with global USE
> flags, so if emerge --info still shows eds, equery will think OOo depends
> on it, no matter what you have in /etc/portage.
I am pretty sure that it uses /var/db/pkg/${category}/${name}/USE to determine
the USE flags that were used when the package was compiled. Also `equery
uses` is affected by /etc/portage/package.use.
--
Bo Andresen
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Unwanted dependencies
2006-06-23 17:57 ` Bo Ørsted Andresen
@ 2006-06-23 21:16 ` Benno Schulenberg
2006-06-24 6:40 ` Jure Varlec
0 siblings, 1 reply; 11+ messages in thread
From: Benno Schulenberg @ 2006-06-23 21:16 UTC (permalink / raw
To: gentoo-user
Bo Ørsted Andresen wrote:
> On Friday 23 June 2006 18:34, Neil Bothwick wrote:
> > AIUI equery works with global USE
> > flags, so if emerge --info still shows eds, equery will think
> > OOo depends on it, no matter what you have in /etc/portage.
>
> I am pretty sure that it uses /var/db/pkg/${category}/${name}/USE
> to determine the USE flags that were used when the package was
> compiled.
It should, but it doesn't do that. For example, on my system I have
no hal:
$ eix -e hal | grep Installed
Installed: none
But:
$ equery depends hal
[ Searching for packages depending on hal... ]
gnome-base/gnome-vfs-2.12.2
app-cdr/k3b-0.12.15
It apparently produces any package that either depends on hal, or
_conditionally_ depends on hal. It clearly doesn't take USE flags
into account.
$ emerge --info | grep hal
[nothing]
$ equery --version
equery(0.1.4) - Gentoo Package Query Tool
Author(s): Karl Trygve Kalleberg
The previous version didn't list any conditional dependency, even
when the USE flag was set and the package installed, the current
version lists these conditional deps always.
These bugs look relevant:
https://bugs.gentoo.org/show_bug.cgi?id=81012
https://bugs.gentoo.org/show_bug.cgi?id=124053
Benno
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Unwanted dependecies
2006-06-23 16:34 ` Neil Bothwick
2006-06-23 17:57 ` Bo Ørsted Andresen
@ 2006-06-23 18:18 ` Jure Varlec
1 sibling, 0 replies; 11+ messages in thread
From: Jure Varlec @ 2006-06-23 18:18 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]
On Friday 23 June 2006 18:34, Neil Bothwick wrote:
> On Fri, 23 Jun 2006 17:51:16 +0200, Jure Varlec wrote:
> > Note: you might remember I wrote that oo.org used to be compiled with
> > USE="eds", which pulls these in along with other stuff indirectly
> > through gnome-extra/evolution-data-server. It was the reason these libs
> > were installed in the first place. The dependency problem I'm
> > describing, however, is independent from that and was present even
> > after I recompiled oo.org without "eds".
>
> How did you disable that USE flag? AIUI equery works with global USE
> flags, so if emerge --info still shows eds, equery will think OOo depends
> on it, no matter what you have in /etc/portage.
It's disabled in make.conf. I have a policy to disable global flags there, and
local flags in package.use. It's just that I missed eds when I went through
global flags, and I obviously didn't pay attention when I emerged oo.org. Not
that it matters for the problem at hand.
Jure
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Unwanted dependecies
2006-06-23 15:51 ` Jure Varlec
2006-06-23 16:34 ` Neil Bothwick
@ 2006-06-23 17:40 ` Bo Ørsted Andresen
2006-06-23 18:41 ` Jure Varlec
1 sibling, 1 reply; 11+ messages in thread
From: Bo Ørsted Andresen @ 2006-06-23 17:40 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3205 bytes --]
On Friday 23 June 2006 17:51, Jure Varlec wrote:
> Thank you for replying. I see now that I should clarify further what is
> bothering me, as you didn't quite see my point. I guess it got lost in the
> noise. No more stories then :)
It was not lost. Just questioned...
[SNIP]
> Gentoolkit is 0.2.2. After equery, I took a look at the ebuild.
> As for the eclasses, I must admit I'm still not too comfortable with them,
> which is what I was actually referring to when I said I need to understand
> portage better. It's a shame really considering that I've been using gentoo
> for two-and-a-half years. I need to get spanked ;) . But as far as I
> understand it (and from what I can see looking at the eclasses) they are
> merely collections of useful shell functions which devs can use when
> writing ebuilds.
ebuilds inherit dependencies and USE flags from the eclasses too.
[SNIP]
> As you can see, it does not inherit anything, and does not depend on
> anything gnomish. However, when I checked with equery, it definitely
> depended on something which I didn't need/want (sorry, I can't remember
> what it was, probably gconf or some such), although the ebuild specifies no
> such dependency, not even indirectly (through gtk+ etc.) After I removed
> the unwanted dep and remerged gqview, it did not pull the removed
> "dependency" back in, and no longer depends on it.
Hard to comment on since you don't remember..
> The same applies for dependencies which were disabled through use flags,
> such
>
> as this snip (from openoffice):
> > gnome? ( >=x11-libs/gtk+-2.4
> >
> > >=gnome-base/gnome-vfs-2.6
> > >=gnome-base/gconf-2.0 )
>
> In this case, It depended on gnome-vfs and gconf, even when the gnome USE
> flag was disabled. After I removed the offending packages and recompiled
> openoffice, the dependecy is gone.
> Note: you might remember I wrote that oo.org used to be compiled with
> USE="eds", which pulls these in along with other stuff indirectly through
> gnome-extra/evolution-data-server. It was the reason these libs were
> installed in the first place. The dependency problem I'm describing,
> however, is independent from that and was present even after I recompiled
> oo.org without "eds".
I do have openoffice and gnome-vfs too. equery depends gnome-vfs does report
openoffice for me despite the fact that the gnome use flag is disabled. So I
tried removing gnome-vfs from /var/db/pkg/app-office/openoffice*/{R,}DEPEND.
That stopped equery from showing openoffice with equery depends gnome-vfs. I
also tried removing gnome-vfs and running revdep-rebuild -p. This did not
report any broken dependencies from openoffice. So I think it is very
possible that there are still bugs in equery... I don't know though how
equery works though so it's just a guess.
[SNIP]
> *Sigh*
> I hope I'm missing something here. Because if these are bugs, there's quite
> a few. Sadly, I removed all the temporary lists of packages I removed and
> rebuilt, so I have nothing to report now. Stupid me.
While I think those are bugs they are really minor.
--
Bo Andresen
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Unwanted dependecies
2006-06-23 17:40 ` Bo Ørsted Andresen
@ 2006-06-23 18:41 ` Jure Varlec
2006-06-23 22:47 ` Bo Ørsted Andresen
0 siblings, 1 reply; 11+ messages in thread
From: Jure Varlec @ 2006-06-23 18:41 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]
On Friday 23 June 2006 19:40, Bo Ørsted Andresen wrote:
> I do have openoffice and gnome-vfs too. equery depends gnome-vfs does
> report openoffice for me despite the fact that the gnome use flag is
> disabled. So I tried removing gnome-vfs from
> /var/db/pkg/app-office/openoffice*/{R,}DEPEND. That stopped equery from
> showing openoffice with equery depends gnome-vfs. I also tried removing
> gnome-vfs and running revdep-rebuild -p. This did not report any broken
> dependencies from openoffice. So I think it is very possible that there are
> still bugs in equery... I don't know though how equery works though so it's
> just a guess.
Hm. I guess it's not hard to imagine equery fails to read USE flags correctly
and that would make it a bug. But this still doesn't explain gqview, which
doesn't have neither hard nor USE dependencies on anything I removed.
Obviously I have to do more research, especially since I haven't any data to
support me. And I thought cleaning out unneeded libs would be a fun thing to
do in between the exams :) . Meh. Unless someone picks this up, I'll have
more time in a month or so. I'm definitely not going to file any bugs or some
such until I know more.
Thank you for your input
Jure
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-06-24 6:49 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-23 12:35 [gentoo-user] Unwanted dependecies Jure Varlec
2006-06-23 14:14 ` Bo Ørsted Andresen
2006-06-23 15:51 ` Jure Varlec
2006-06-23 16:34 ` Neil Bothwick
2006-06-23 17:57 ` Bo Ørsted Andresen
2006-06-23 21:16 ` [gentoo-user] Unwanted dependencies Benno Schulenberg
2006-06-24 6:40 ` Jure Varlec
2006-06-23 18:18 ` [gentoo-user] Unwanted dependecies Jure Varlec
2006-06-23 17:40 ` Bo Ørsted Andresen
2006-06-23 18:41 ` Jure Varlec
2006-06-23 22:47 ` Bo Ørsted Andresen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox