Section: qdepends (1)
Updated: May 2018
qdepends - show dependency info
applet has a couple different modes. Normally it is geared towards
answering the queries "what does package X depend on" and "what packages depend
on X". Both can further be classified into build, run, and post dependencies.
By default, it will tell you the build time dependencies only (DEPEND).
will only query installed packages. There is no support for
querying packages not yet installed (see equery(1) for that).
If there is no answer to your query (i.e. you've asked for a package that is not
installed, or a version that does not match), then you will get back no output.
- -d, --depend
Show DEPEND info (default).
- -r, --rdepend
Show RDEPEND info.
- -p, --pdepend
Show PDEPEND info.
- -k <arg>, --key <arg>
Advanced option to allow querying the VDB. This option overrides
-d, -r, -p or -a. <arg> can be
any key from Portage's VDB, e.g. any file from
- -Q <arg>, --query <arg>
Query reverse deps. This basically reverses the search to any
package that references <arg> in DEPEND, RDEPEND or PDEPEND.
This can be useful to find consumers of a given package, e.g. to
search for packages that have logwatch in their DEPEND.
- -N, --name-only
Only show category/package, instead of category/package-version.
- -a, --all
Show *DEPEND, alias for -drp.
- -f, --format
Pretty-print DEPEND declaration to be used in an ebuild. This
option initiates a very different mode of operation. Instead of
printing searching through packages, it constructs a multi-line
statement in with shell syntax, to be used in an ebuild. Each
argument is turned into a separate DEPEND variable declaration. You
need to quote dependency strings in order for them to be printed as
a single dependency declaration. When used with the -q
option, only the pretty-printed dependency declaration is printed,
e.g. the DEPEND= part is skipped.
- --root <arg>
Set the ROOT env var.
- -v, --verbose
When in reverse dep mode, print the package or packages that matched
the query from the dependency line being searched. This includes
specifiers and versions.
- -q, --quiet
Suppress DEPEND= output for -f.
- -C, --nocolor
Don't output color.
- -h, --help
Print this help and exit.
- -V, --version
Print version and exit.
For finding out what a particular package depends on for building, you could do:
$ qdepends nano
app-editors/nano-2.3.2: >=sys-libs/ncurses-5.9-r1[unicode] sys-apps/file ...
This tells us that we have app-editors/nano-2.3.2
installed and it depends
on ncurses (among other things).
Searching for packages that actually have nano in their RDEPEND:
$ qdepends -rQ nano
Tells us that virtual/editor
depends on nano. However, if we
wanted to know in what way a package specifically depends on another
package, one can use -v
$ qdepends -vrQ logrotate
This way we can see there is a specific dependency expressed here. If
the above had used <logrotate-3
, for example, no matches would be
returned. Not using any specifiers allows to reveal in what way a
dependency is expressed.
Please report bugs via http://bugs.gentoo.org/
Product: Portage Development; Component: Tools, Assignee:
Ned Ludd <email@example.com>
Mike Frysinger <firstname.lastname@example.org>
Fabian Groffen <email@example.com>