public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Showing "reverse" dependencies
@ 2008-11-09  3:51 meino.cramer
  2008-11-09  4:04 ` Dale
  0 siblings, 1 reply; 7+ messages in thread
From: meino.cramer @ 2008-11-09  3:51 UTC (permalink / raw
  To: Gentoo

Hi,

is there a way to list the package, which depend on 
a given (known) package (in my case a library)?

Kind regards,
 Meino Cramer

-- 
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Showing "reverse" dependencies
  2008-11-09  3:51 [gentoo-user] Showing "reverse" dependencies meino.cramer
@ 2008-11-09  4:04 ` Dale
  2008-11-09  6:13   ` Alan McKinnon
  0 siblings, 1 reply; 7+ messages in thread
From: Dale @ 2008-11-09  4:04 UTC (permalink / raw
  To: gentoo-user

meino.cramer@gmx.de wrote:
> Hi,
>
> is there a way to list the package, which depend on 
> a given (known) package (in my case a library)?
>
> Kind regards,
>  Meino Cramer
>
>   

If I understand correctly, equery depends <package name> .  That's if I
understand correctly.  If you don't have it, emerge gentoolkit.

Hope that helps.

Dale

:-)  :-) 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Showing "reverse" dependencies
  2008-11-09  4:04 ` Dale
@ 2008-11-09  6:13   ` Alan McKinnon
  2008-11-09 10:11     ` Daniel Pielmeier
  2008-11-09 10:41     ` Markos Chandras
  0 siblings, 2 replies; 7+ messages in thread
From: Alan McKinnon @ 2008-11-09  6:13 UTC (permalink / raw
  To: gentoo-user

On Sunday 09 November 2008 06:04:02 Dale wrote:
> meino.cramer@gmx.de wrote:
> > Hi,
> >
> > is there a way to list the package, which depend on
> > a given (known) package (in my case a library)?
> >
> > Kind regards,
> >  Meino Cramer
>
> If I understand correctly, equery depends <package name> .  That's if I
> understand correctly.  If you don't have it, emerge gentoolkit.

Just be aware that equery depends is somewhat broken

It lists dependencies in the tree, not dependencies a specific machine is 
using. Plus it doesn't find some valid deps either.

It's still useful, but the user also has to use eix to determine which deps 
are valid for them and which are not.


-- 
alan dot mckinnon at gmail dot com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Showing "reverse" dependencies
  2008-11-09  6:13   ` Alan McKinnon
@ 2008-11-09 10:11     ` Daniel Pielmeier
  2008-11-09 10:41     ` Markos Chandras
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Pielmeier @ 2008-11-09 10:11 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 3466 bytes --]

Alan McKinnon schrieb am 09.11.2008 07:13:
> On Sunday 09 November 2008 06:04:02 Dale wrote:
>> meino.cramer@gmx.de wrote:
>>> Hi,
>>>
>>> is there a way to list the package, which depend on
>>> a given (known) package (in my case a library)?
>>>
>>> Kind regards,
>>>  Meino Cramer
>> If I understand correctly, equery depends <package name> .  That's if I
>> understand correctly.  If you don't have it, emerge gentoolkit.
> 
> Just be aware that equery depends is somewhat broken
> 
> It lists dependencies in the tree, not dependencies a specific machine is 
> using. Plus it doesn't find some valid deps either.
> 
> It's still useful, but the user also has to use eix to determine which deps 
> are valid for them and which are not.
> 

There is a possibility to get the reverse dependencies, but it seems
almost nobody is aware of this because this function of portage is
mostly used for cleaning up unneeded packages. But in order to remove
unneeded packages portage has to know the reverse dependencies of each
package to determine if it is unneeded.

emerge -pv --depclean atom

Always consider that equery and depclean only work on packages that are
installed on the system and not for packages that are not.
Gentoo-Portage [1] can list the reverse dependencies for packages that
are not installed.



Note the output of equery is sometimes wrong. To test this let us
compare the output of the "emerge -pv depclean atom" with "equery
depends atom". For example we want to check the reverse dependencies of
x11-libs/gtk+ on my system.

It is almost identical besides 1) media-video/mplayer and 2)
sys-devel/gcc are listed only in equery and 3) net-www/gnash is only
listed in depclean output.

1) So why is mplayer listed in equery. The gtk use flag is globally on
on my system but I have disabled gtk in package.use so equery is wrong here.

2) Now for gcc I have no entry in package.use that disables it so it
seems at the first glance equery is right. Lets take a look at the
ebuild itself. The following is from the RDEPEND section.

!build? (
 gcj? (
  gtk? (
   x11-libs/libXt
   x11-libs/libX11
   x11-libs/libXtst
   x11-proto/xproto
   x11-proto/xextproto
   >=x11-libs/gtk+-2.2
   x11-libs/pango
)

To explain this, it says if the build flag is disabled and gcj and gtk
are enabled it will depend on the the packages listed below gtk. I have
build and gcj disabled but gtk enabled, so it does not fulfill the
conditions needed for a gtk dependency and equery is wrong again.

3) Now finally why does depclean list gnash and equery not. The gtk flag
is enabled for the ebuild and the dependency list in the ebuild clearly
shows:

gtk? (
 >x11-libs/gtk+-2
 x11-libs/pango
 dev-libs/glib
 dev-libs/atk
)

I guess equery gets confused by the following construct in the ebuild
which looks similar to the gcc case:

!gtk? ( !kde? ( !qt3? ( !sdl? ( ( !fbcon? (
 >x11-libs/gtk+-2
 x11-libs/pango
 dev-libs/glib
 dev-libs/atk
 =kde-base/kdelibs-3.5*
) ) ) ) ) )

This conditions doesn't match on my system so equery does not list
gnash. In addition I think such conditions may cause some
misunderstanding as they mean if gtk kde qt3 sdl and fbcon are all unset
it should depend on gtk and kde which would be rather confusing for the
user if he has this flags unset.



[1] http://www.gentoo-portage.com/x11-libs/gtk+/RDep#ptabs

Regards,

Daniel



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Showing "reverse" dependencies
  2008-11-09  6:13   ` Alan McKinnon
  2008-11-09 10:11     ` Daniel Pielmeier
@ 2008-11-09 10:41     ` Markos Chandras
  2008-11-09 11:03       ` Daniel Pielmeier
  2008-11-09 15:17       ` Alan McKinnon
  1 sibling, 2 replies; 7+ messages in thread
From: Markos Chandras @ 2008-11-09 10:41 UTC (permalink / raw
  To: gentoo-user; +Cc: Alan McKinnon

On Sunday 09 November 2008 08:13:41 Alan McKinnon wrote:
> On Sunday 09 November 2008 06:04:02 Dale wrote:
> > meino.cramer@gmx.de wrote:
> > > Hi,
> > >
> > > is there a way to list the package, which depend on
> > > a given (known) package (in my case a library)?
> > >
> > > Kind regards,
> > >  Meino Cramer
> >
> > If I understand correctly, equery depends <package name> .  That's if I
> > understand correctly.  If you don't have it, emerge gentoolkit.
>
> Just be aware that equery depends is somewhat broken
>
> It lists dependencies in the tree, not dependencies a specific machine is
> using. Plus it doesn't find some valid deps either.
>
> It's still useful, but the user also has to use eix to determine which deps
> are valid for them and which are not.

well , what about dep?

from dep manpage

         -l, --depends      (default) List dependencies of PACKAGE
         -L, --rev-depends  List reverse dependencies of PACKAGE

show try dep -l amarok and you will get amarok dependencies .
Or try dep -L amarok and you will get the packages that depend on amarok 

Sorry If I understand your question wrong

-- 
Markos Chandras



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Showing "reverse" dependencies
  2008-11-09 10:41     ` Markos Chandras
@ 2008-11-09 11:03       ` Daniel Pielmeier
  2008-11-09 15:17       ` Alan McKinnon
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Pielmeier @ 2008-11-09 11:03 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 680 bytes --]

Markos Chandras schrieb am 09.11.2008 11:41:
> well , what about dep?
> 
> from dep manpage
> 
>          -l, --depends      (default) List dependencies of PACKAGE
>          -L, --rev-depends  List reverse dependencies of PACKAGE
> 
> show try dep -l amarok and you will get amarok dependencies .
> Or try dep -L amarok and you will get the packages that depend on amarok 
> 
> Sorry If I understand your question wrong
> 

dep is nice and it used to be a very powerful tool. Unfortunately it is
outdated and with more and more changes because of EAPI's and other
stuff it gets more and more useless because it can not handle this cases.

Regards,

Daniel


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Showing "reverse" dependencies
  2008-11-09 10:41     ` Markos Chandras
  2008-11-09 11:03       ` Daniel Pielmeier
@ 2008-11-09 15:17       ` Alan McKinnon
  1 sibling, 0 replies; 7+ messages in thread
From: Alan McKinnon @ 2008-11-09 15:17 UTC (permalink / raw
  To: gentoo-user

On Sunday 09 November 2008 12:41:04 Markos Chandras wrote:
> > Just be aware that equery depends is somewhat broken
> >
> > It lists dependencies in the tree, not dependencies a specific machine is
> > using. Plus it doesn't find some valid deps either.
> >
> > It's still useful, but the user also has to use eix to determine which
> > deps are valid for them and which are not.
>
> well , what about dep?
>
> from dep manpage
>
>          -l, --depends      (default) List dependencies of PACKAGE
>          -L, --rev-depends  List reverse dependencies of PACKAGE
>
> show try dep -l amarok and you will get amarok dependencies .
> Or try dep -L amarok and you will get the packages that depend on amarok
>
> Sorry If I understand your question wrong

Interesting command. I didn't even know of it till I read your post, so I 
can't comment on whether it works well or not.

equery on the other hand, is known to give accurate answers to a question the 
user normally did not ask. i.e. it doesn't really do what users wish it did.

-- 
alan dot mckinnon at gmail dot com



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-11-09 15:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-09  3:51 [gentoo-user] Showing "reverse" dependencies meino.cramer
2008-11-09  4:04 ` Dale
2008-11-09  6:13   ` Alan McKinnon
2008-11-09 10:11     ` Daniel Pielmeier
2008-11-09 10:41     ` Markos Chandras
2008-11-09 11:03       ` Daniel Pielmeier
2008-11-09 15:17       ` Alan McKinnon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox