aboutsummaryrefslogtreecommitdiff
blob: 8b0ad690ac1a608a70c80a4c530076f776a5bbdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
.\" generated by mkman.py, please do NOT edit!
.TH qdepends "1" "Jul 2019" "Gentoo Foundation" "qdepends"
.SH NAME
qdepends \- show dependency info
.SH SYNOPSIS
.B qdepends
\fI[opts] <pkgname>\fR
.SH DESCRIPTION
The
.I 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) and EAPI7's BDEPEND dependencies.
.P
By default, \fIqdepends\fR returns the unique set of atoms that match
all dependency variables.  To split this out per variable, use \fB-v\fR
option.
.P
Currently,
.I qdepends
defaults to query installed packages.  To query packages from ebuild
trees, use the \fB-t\fR option.
.P
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.
.P
After version \fB0.74\fR of portage-utils, \fIqdepends\fR was changed
considerably to be more consistent and more advanced.  Most notably,
this has changed default output for reverse mode (\fB-Q\fR).  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 \fB-N\fR option was removed, as the same
effect can be achieved via the new \fB-F\fR option or \fB-q\fR option.
The \fB-f\fR option was renamed to \fB-S\fR.
.SH OPTIONS
.TP
\fB\-d\fR, \fB\-\-depend\fR
Show DEPEND info.
.TP
\fB\-r\fR, \fB\-\-rdepend\fR
Show RDEPEND info.
.TP
\fB\-p\fR, \fB\-\-pdepend\fR
Show PDEPEND info.
.TP
\fB\-b\fR, \fB\-\-bdepend\fR
Show BDEPEND info.
.TP
\fB\-Q\fR, \fB\-\-query\fR
Query reverse deps.  This basically reverses the search to any
package that references \fI<arg>\fR 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 \fIlogwatch\fR 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 \fBqatom\fR(1).
.TP
\fB\-i\fR, \fB\-\-installed\fR
Search installed packages using VDB.
.TP
\fB\-t\fR, \fB\-\-tree\fR
Search available ebuilds in the tree.
.TP
\fB\-F\fR \fI<arg>\fR, \fB\-\-format\fR \fI<arg>\fR
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 \fB\-q\fR
option, only the pretty-printed dependency declaration is printed,
e.g.\ the DEPEND= part is skipped.
.TP
\fB\-S\fR, \fB\-\-pretty\fR
Pretty format specified depend strings.
.TP
\fB\-\-root\fR \fI<arg>\fR
Set the ROOT env var.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Pretty-print atoms output, per DEPEND-variable.  This is much like
the \fB-f\fR option, but uses as input the dependency info from the
matches.  When used with \fB-t\fR, the atom highlighting matches
what is used by the installed package, if available.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Suppress DEPEND= output for \fB\-f\fR.  Only print the matching atom for \fB\-Q\fR.  When given two or more times, suppresses the matching atom for \fB\-Q\fR, e.g.\ producing just a list of packages.
.TP
\fB\-C\fR, \fB\-\-nocolor\fR
Don't output color.
.TP
\fB\-h\fR, \fB\-\-help\fR
Print this help and exit.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version and exit.
.SH "EXAMPLES"
For finding out what a particular package depends on for building, you could do:
.nf
	$ \fIqdepends -d nano\fR
	app-editors/nano-2.3.2: >=sys-libs/ncurses-5.9-r1[unicode] sys-apps/file ...
.fi
This tells us that we have \fIapp-editors/nano-2.3.2\fR installed and it depends
on ncurses (among other things).
.P
Searching for packages that actually depend on logrotate:
.nf
	$ \fIqdepends -qQ logrotate\fR
	sys-apps/portage-2.3.18: !<app-admin/logrotate-3.8.0
.fi
The \fB-q\fR flag suppresses the entire list of dependencies here, so we
can quickly see what specific dependency is expressed here.  If
the above had used \fI<logrotate-3\fR, for example, no matches would be
returned.  Not using any specifiers allows to reveal in what way a
dependency is expressed.
.P
Producing a list of packages that need rebuilding after a Perl upgrade:
.nf
	$ \fIqdepends -Qqq -F '%[CATEGORY]%[PN]%[SLOT]' ^perl:0/5.30\fR
	dev-vcs/git:0
	perl-core/File-Temp:0
	dev-perl/Text-CSV_XS:0
	...
.fi
With the double \fB-q\fR flag, just the matching packages are returned,
allowing to use the list for instance as arguments to \fBemerge\fR(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 (\fI^\fR) is returning all packages that depend on
perl in SLOT \fB0\fR, but in a different SUBSLOT than \fB5.30\fR,
effectively requesting the list of packages that need rebuilding to use
the newly installed version of Perl.
.SH "REPORTING BUGS"
Please report bugs via http://bugs.gentoo.org/
.br
Product: Portage Development; Component: Tools
.SH AUTHORS
.nf
Ned Ludd <solar@gentoo.org>
Mike Frysinger <vapier@gentoo.org>
Fabian Groffen <grobian@gentoo.org>
.fi
.SH "SEE ALSO"
.BR q (1),
.BR qatom (1),
.BR qcheck (1),
.BR qfile (1),
.BR qgrep (1),
.BR qkeyword (1),
.BR qlist (1),
.BR qlop (1),
.BR qmanifest (1),
.BR qmerge (1),
.BR qpkg (1),
.BR qsearch (1),
.BR qsize (1),
.BR qtbz2 (1),
.BR qtegrity (1),
.BR quse (1),
.BR qxpak (1)