Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 10735 - sys-apps/portage or app-portage/gentoolkit - Feature request: Show dependencies in detail; clarifying whether they are DEPEND, RDEPEND or PDEPEND as well as whether they are optional.
Summary: sys-apps/portage or app-portage/gentoolkit - Feature request: Show dependenci...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
: 197748 (view as bug list)
Depends on:
Blocks: 472746
  Show dependency tree
 
Reported: 2002-11-14 07:32 UTC by Alberto Ornaghi
Modified: 2019-08-19 05:38 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Alpha apk (deleted)
2017-01-19 16:20 UTC, Chris Butler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Ornaghi 2002-11-14 07:32:02 UTC
it would be very useful to have a --showdep that shows the dependencies
mandatory or optional for an ebuild disregarding the already installed packages.
this will show only the dependencies listed in the .ebuild file, not all the
recursive deps as for "emerge --pretend --emptytree".

an example for gimp-1.2.3-r3:

> emerge --showdeps gimp 

These are the dependencies for the packet gimp-1.2.3-r3:

Compile time dependencies:
   Mandatory:
      sys-devel/autoconf
      sys-devel/automake
      =x11-libs/gtk+-1.2*
      >=media-libs/mpeg-lib-1.3.1

   Optional (obey to the USE variable):
      nls   : sys-devel/gettext 
      aalib : >=media-libs/aalib-1.2 
      perl  : >=dev-perl/PDL-2.2.1 
              >=dev-perl/Parse-RecDescent-1.80 
              >=dev-perl/gtk-perl-0.7004 
      python: >=dev-lang/python-2.0 
      gnome : >=gnome-base/gnome-libs-1.4.1.2-r1 

Run time dependencies:
   Mandatory:
      =x11-libs/gtk+-1.2*

   Optional:
      aalib : >=media-libs/aalib-1.2 )
      perl  : >=dev-perl/PDL-2.2.1 
              >=dev-perl/Parse-RecDescent-1.80 
              >=dev-perl/gtk-perl-0.7004 
      python: >=dev-lang/python-2.0
      gnome : >=gnome-base/gnome-libs-1.4.1.2-r1

--- end of output ---

this can be easily achived by parsing the .ebuild file. no queries on the
database are needed, so it will be very fast and easy to implemet. 

bye
Comment 1 Andrew Cooks (RETIRED) gentoo-dev 2003-12-07 12:47:43 UTC
I think 'emerge -op gimp' will do this. I'm not sure when this feature was implemented.

I'm resolving this bug as FIXED. Reopen if you don't agree.
Comment 2 Alberto Ornaghi 2003-12-08 02:30:13 UTC
emerge -op  will print only the list of dependencies not yet installed.  I've already installed gimp, and the command `emerge -op gimp` does not give any interesting output...

I know I can edit the ebuild manually to view the dependencies, but IMHO it will be useful to have the list from command line.

bye
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2004-01-12 02:01:03 UTC
This is more something for equery
Comment 4 Paul Varner (RETIRED) gentoo-dev 2006-12-12 12:45:01 UTC
app-portage/udept has this functionality.
Comment 5 michael@smith-li.com 2008-02-23 21:54:30 UTC
does equery depgraph not fulfill this need?
Comment 6 Marijn Schouten (RETIRED) gentoo-dev 2009-08-02 14:43:08 UTC
"equery depgraph" recursively lists a full dependency graph. I think the requested option is to be able to only list the direct deps. 
Comment 7 Paul Varner (RETIRED) gentoo-dev 2009-08-04 04:04:05 UTC
equery depgraph --depth=1 will only show the direct dependencies.  However, it doesn't split them into the build and runtime categories as requested.
Comment 8 Paul Varner (RETIRED) gentoo-dev 2011-07-21 05:22:33 UTC
*** Bug 197748 has been marked as a duplicate of this bug. ***
Comment 9 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-03-15 13:23:37 UTC
Meanwhile you could do:

> . $(equery which gimp) ; echo -e "DEPEND\n$DEPEND\nRDEPEND\n$RDEPEND\nPDEPEND\n$PDEPEND"

It is also reasonable to rewrite this output with a simple shell script to be in the style of yours. This isn't a native implementation, but would do what is requested here if you need it often; I don't think it would be hard for someone to adapt this in equery itself, maybe by someone who will end up being bored by how long this bug has been open.
Comment 10 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2014-09-28 05:51:25 UTC
For contrast, paludis has something like this and I've found it incredibly useful for developing making sure that inherited and otherwise composed dependencies do what I think they do.

And also useful for unconfusing users when they see an ebuild with no/not much content.

For instance.

This reasonably brief ebuild could confuse you if you didn't understand all of the mechanics: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-python/gconf-python/gconf-python-2.28.1-r1.ebuild?revision=1.8&view=markup 

And you get a much more "complete" picture with `cave show`

https://gist.github.com/kentfredric/9f3b2ffbd1367ab895b5

And it can do this equally easily for both installed, and yet-to-be installed packages.

In portage, the closest thing I see to it is the md5 cache emitted by egencache, and that's not exactly ideal for checking your work as a developer, nor is it ideal for end users.

The closest command I can find to paludis'es `cave show` is `equery meta`, which really delivers substantially less utility.
Comment 11 Brian Dolbec (RETIRED) gentoo-dev 2014-09-28 14:45:24 UTC
I suppose I never thought of this type of functionality because I already had nearly the same (and more) in porthole's ebuild and dependency views.  Your cave example it essentially the ebuild minus the build code.

Porthole's ebuild view is gentoo syntax highlighted, you can select which ebuild in the pkg, etc...  the dependency view shows you which dependencies are installed, which are needed, they are dble-clickable to open another view window of the dependency, and it's dependencies...

I use porthole for nearly all my pkg search queries... Yes, I know it's a gui, not a cli app ;)
Comment 12 Chris Butler 2017-01-19 16:20:45 UTC
Created attachment 460644 [details]
Alpha apk
Comment 13 Zac Medico gentoo-dev 2017-01-19 17:15:23 UTC
(In reply to Brian Dolbec from comment #11)
> I use porthole for nearly all my pkg search queries... Yes, I know it's a
> gui, not a cli app ;)

Yeah, we need a cli tool.

(In reply to Chris Butler from comment #12)
> Created attachment 460644 [details]
> Alpha apk

That file doesn't seem relevant to the bug. I hope you're not abusing our bugzilla for file hosting.
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-01-19 18:48:21 UTC
The content of attachment 460644 [details] has been deleted for the following reason:

likely malware