qdepends(1)

NAME
qdepends - show dependency info

SYNOPSIS
qdepends [opts] <pkgname>

DESCRIPTION
The qdepends applet has two different modes, forward and reverse dependency querying. Default operation is forward mode, answering the queries "what does package X depend on", while reverse mode answers "what packages depend on X". Both modes can be further specified into build (DEPEND), run (RDEPEND), post (PDEPEND), EAPI7's build (BDEPEND) and EAPI8's install-time (IDEPEND) dependencies.

By default, qdepends returns the unique set of atoms that match all dependency variables. To split this out per variable, use -v option.

Currently, qdepends defaults to query installed packages. To query packages from ebuild trees, use the -t option.

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

After version 0.74 of portage-utils, qdepends was changed considerably to be more consistent and more advanced. Most notably, this has changed default output for reverse mode (-Q). Instead of just displaying the package name, like for forward mode, all dependencies for the package are shown. When colours are enabled, the matched atom is highlighted in the list. In addition to just querying DEPEND, the default mode changed to query all DEPEND-variables, and return the unique atoms found in them. Automatic regular expression match support was removed. The -N option was removed, as the same effect can be achieved via the new -F option or -q option. The -f option was renamed to -S.

OPTIONS

-d, --depend
    Show DEPEND info.

-r, --rdepend
    Show RDEPEND info.

-p, --pdepend
    Show PDEPEND info.

-b, --bdepend
    Show BDEPEND info.

-I, --idepend
    Show IDEPEND info.

-Q, --query
    Query reverse deps. This basically reverses the search to any package that references <arg> in DEPEND, RDEPEND, PDEPEND or BDEPEND. This can be useful to find consumers of a given package, e.g. to search for packages that have logwatch in their DEPEND. Note that using versions or range specifiers may yield odd results since dependency strings often have ranges themselves. For installed packages, SLOT and SUBSLOTs are available, thus SLOT and antiSLOT queries are possible. See qatom(1).

-i, --installed
    Search installed packages using VDB.

-t, --tree
    Search available ebuilds in the tree.

-U, --use
    Apply profile USE-flags to conditional deps.

-F <arg>, --format <arg>
    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 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.

-S, --pretty
    Pretty format specified depend strings.

-R, --resolve
    Resolve found dependencies to package versions.

--root <arg>
    Set the ROOT env var.

-v, --verbose
    Pretty-print atoms output, per DEPEND-variable. This is much like the -f option, but uses as input the dependency info from the matches. When used with -t, the atom highlighting matches what is used by the installed package, if available.

-q, --quiet
    Suppress DEPEND= output for -f. Only print the matching atom for -Q. When given two or more times, suppresses the matching atom for -Q, e.g. producing just a list of packages.

-C, --nocolor
    Don't output color.

--color
    Force color in output.

-h, --help
    Print this help and exit.

-V, --version
    Print version and exit.

EXAMPLES
For finding out what a particular package depends on for building, you could do:
	$ qdepends -d 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 depend on logrotate:
	$ qdepends -qQ logrotate
	sys-apps/portage-2.3.18: !<app-admin/logrotate-3.8.0
The -q flag suppresses the entire list of dependencies here, so we can quickly see what specific dependency is 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.

Producing a list of packages that need rebuilding after a Perl upgrade:
	$ qdepends -Qqq -F '%[CATEGORY]%[PN]%[SLOT]' ^perl:0/5.30
	dev-vcs/git:0
	perl-core/File-Temp:0
	dev-perl/Text-CSV_XS:0
	...
With the double -q flag, just the matching packages are returned, allowing to use the list for instance as arguments to emerge(1). The custom formatter in this case ensures all selected packages will be the best matching for the currently installed SLOT. Finally, the use of the antislot matching (^) is returning all packages that depend on perl in SLOT 0, but in a different SUBSLOT than 5.30, effectively requesting the list of packages that need rebuilding to use the newly installed version of Perl.

REPORTING BUGS
Please report bugs via http://bugs.gentoo.org/
Product: Gentoo Linux; Component: Current packages

AUTHORS
Ned Ludd <solar@gentoo.org>
Mike Frysinger <vapier@gentoo.org>
Fabian Groffen <grobian@gentoo.org>

SEE ALSO
q(1), qatom(1), qcheck(1), qfile(1), qgrep(1), qkeyword(1), qlist(1), qlop(1), qmanifest(1), qmerge(1), qpkg(1), qsearch(1), qsize(1), qtbz2(1), qtegrity(1), quse(1), qwhich(1), qxpak(1)