sync with genscripts rev 343. This adds the initial py3k support and the analyse...
[gentoolkit.git] / man / equery.1
1 .TH "EQUERY" "1" "August 2009" "GENTOOLKIT"
2 .SH "NAME"
3 equery \- Gentoo Package Query Tool
4
5 .SH "SYNOPSIS"
6 .BI "equery " "[global-options] " "module " "[local-options]"
7
8 .SH "DESCRIPTION"
9 .B Equery
10 is a collection of modules for querying the state of Gentoo packages, files and USE flags.
11
12 .SH "GLOBAL OPTIONS"
13 .HP
14 .B \-h, \-\-help
15 .br
16 Output a help message.
17 .HP
18 .B \-q, \-\-quiet
19 .br
20 Be less verbose where possible. In some modules, this option can increase the output speed.
21 .HP
22 .B \-C, \-\-no-color
23 .br
24 Do not colorize output.
25 .HP
26 .B \-N, \-\-no\-pipe
27 .br
28 Turn off automatic pipe detection. Use this option if you do not want
29 .B equery
30 to detect if the output is being directed to the screen or to another program and adjust color and verbosity accordingly.
31 .HP
32 .B \-V, \-\-version
33 .br
34 Display \fBGentoolkit\fP's version. Please include this in all bug reports. (see
35 .B BUGS
36 below)
37
38 .SH "MODULES"
39 .B Equery
40 uses a system of modules. Each module has both a long and short name. The list below uses the notation "\fBmodule (m)\fP", where \fIm\fP is the short name and \fImodule\fP is the long name.
41 .P
42 You can view the
43 .B help
44 message for a specific module by using
45 .BR "-h" ", " "--help "
46 as either a global option (after
47 .B equery
48 and before the module name) or as a local option (after the module name).
49
50 .SS
51 .BI "belongs (b) [OPTIONS] " "FILE"
52 List the package that owns \fIFILE\fP.
53 .P
54 .BI Note:
55 Normally, only one package will own \fIFILE\fP. If multiple packages own the
56 same file it should be reported. (see
57 .B BUGS
58 below)
59
60 .IR "LOCAL OPTIONS" ":"
61 .HP
62 .B \-f, \-\-full-regex
63 .br
64 The supplied query is a regular expression.
65 .HP
66 .B \-e, \-\-early-out
67 .br
68 Stop when the first match is found. This is generally a safe optimization when searching for the owner of a single file.
69 .HP
70 .B \-n, \-\-name-only
71 .br
72 Do not print the version.
73 .P
74 .IR "EXAMPLES" ":"
75 .EX
76 .HP
77 equery belongs --early-out /usr/bin/euse
78 .EE
79 .br
80 Find out what package installed a certain command.
81 .EX
82 .HP
83 emerge -p $(equery -q belongs -nf '^/usr/bin/g?vim.*')
84 .EE
85 .br
86 Tell
87 .B emerge
88 to reinstall or update any package that installed a file matching a regular expression.
89
90 .SS
91 .BI "changes (c) [OPTIONS] " "PKG"
92 Display the Gentoo ChangeLog entry for the latest installable version of \fIPKG\fP.
93
94 .IR "LOCAL OPTIONS" ":"
95 .HP
96 .B \-l, \-\-latest
97 .br
98 Display only the latest ChangeLog entry. It's not uncommon for changes to be prepended to the ChangeLog without a version header if the changes did not require a version bump. Use this option to display such entries.
99 .HP
100 .B \-f, \-\-full
101 .br
102 Display the full ChangeLog.
103 .br
104 \fBHint\fP: Try piping (|) the output to a pager, like 'less'.
105 .HP
106 .BI "\-\-limit=" "NUM"
107 .br
108 Limit the \fINUM\fP of entries displayed. Use  this option in conjunction with \fB--full\fP. \fB--limit=3\fP would display the three latest entries.
109 .HP
110 .BI "\-\-from=" "VER"
111 .br
112 Set which \fIVER\fP to display from. Using this option by itself is equivalent to passing \fBchanges\fP a ranged package atom, e.g., '>=foo/bar-1.5'. It can be used in conjunction with \fB--to\fP to request a more complex range of entries.
113 .HP
114 .BI "\-\-to=" "VER"
115 .br
116 Set which \fIVER\fP to display to. (See \fB--from\fP)
117 .P
118 .IR "EXAMPLES" ":"
119 .EX
120 .HP
121 equery changes portage
122 .EE
123 .br
124 Display the Gentoo ChangeLog entry for the latest installable version of Portage.
125 .EX
126 .HP
127 equery changes '=sys-apps/portage-2.1.6*'
128 .EE
129 .br
130 Use Portage's atom syntax. (See \fBman 5 ebuild\fP)
131 .EX
132 .HP
133 equery changes portage --from=2.2_rc1 --to=2.2
134 .EE
135 .br
136 Display any ChangeLog entry within a range of versions.
137
138 .SS
139 .BI "check (k) [OPTIONS] " "PKG"
140 Check timestamps and MD5 sums for files owned by \fIPKG\fP, where \fIPKG\fP is an installed package.
141
142 .IR "LOCAL OPTIONS" ":"
143 .HP
144 .B \-f, \-\-full-regex
145 .br
146 The supplied query is a regular expression.
147 .HP
148 .B \-o, \-\-only-failures
149 .br
150 Only display packages which don't pass all checks.
151 .P
152 .IR "EXAMPLES" ":"
153 .EX
154 .HP
155 equery check --only-failures '*'
156 .EE
157 .br
158 Verify timestamps and MD5 sums for all installed packages and show only packages which fail checks.
159 .EX
160 .HP
161 equery check 'dev-python/*' dev-lang/python
162 .EE
163 .br
164 Verify every installed package in the \fBdev-python\fP category, and Python itself.
165
166 .SS
167 .BI "depends (d) [OPTIONS] " "PKG"
168 List all packages that depend on \fIPKG\fP.
169
170 .IR "LOCAL OPTIONS" ":"
171 .HP
172 .B \-a, \-\-all-packages
173 .br
174 Include dependencies that are not installed. This can take a while.
175 .HP
176 .B \-D, \-\-indirect
177 .br
178 Search for both direct and indirect dependencies.
179 .HP
180 .BI "\-\-depth=" "NUM"
181 .br
182 Limit the indirect dependency tree to a depth of \fINUM\fP. \fB--depth=0\fP is equivalent to not using \fB--indirect\fP.
183 .P
184 .IR "EXAMPLES" ":"
185 .EX
186 .HP
187 equery depends --indirect xulrunner
188 .EE
189 .br
190 Figure out why a package got installed on your system.
191
192 .SS
193 .BI "depgraph (g) [OPTIONS] " "PKG"
194 Display a direct dependency graph for every matching version of \fIPKG\fP. A dependency graph is an
195 indented tree showing the relationship between packages and their dependencies.
196
197 .IR "LOCAL OPTIONS" ":"
198 .HP
199 .B \-A, \-\-no-atom
200 .br
201 Do not show the dependency atom that match the package.
202 .HP
203 .B \-U, \-\-no-useflags
204 .br
205 Do not show USE flags.
206 .HP
207 .B \-l, \-\-linear
208 .br
209 Do not format the graph by indenting dependencies. This option will print the
210 recursion depth in square brackets before the package name for easier viewing
211 in narrow terminals.
212 .HP
213 .BI "\-\-depth=" "NUM"
214 .br
215 Limit the dependency graph to a depth of \fINUM\fP. \fB--depth=0\fP means no
216 maximum depth. Default depth is set to 1.
217 .P
218 .IR "EXAMPLES" ":"
219 .EX
220 .HP
221 equery depgraph --depth=0 portage
222 .EE
223 .br
224 View a full tree of all direct and indirect compile-time, run-time, and post-merge dependencies for a package.
225
226 .SS
227 .BI "files (f) [OPTIONS] " "PKG"
228 List files and directories installed by \fIPKG\fP.
229
230 .IR "LOCAL OPTIONS" ":"
231 .HP
232 .B \-m, \-\-md5sum
233 .br
234 Include the file's MD5 sum in the output.
235 .HP
236 .B \-s, \-\-timestamp
237 .br
238 Include the file's timestamp in the output.
239 .HP
240 .B \-t, \-\-type
241 .br
242 Include the file type in the output.
243 .HP
244 .B \-\-tree
245 .br
246 Display files in a tree format. This option turns off all other local options.
247 .HP
248 .BI "\-f, \-\-filter=" "RULES"
249 .br
250 Filter output by file type.
251 .HP
252 RULES
253 .br
254 A comma-separated list (no spaces); choose from:
255 .br
256 .B dir, obj, sym, dev, path, conf, cmd, doc, man, info
257 .P
258 .IR "EXAMPLES" ":"
259 .EX
260 .HP
261 equery files --tree vlc
262 .EE
263 .br
264 View a file tree of all files installed by a package.
265 .EX
266 .HP
267 equery files --filter=cmd vlc
268 .EE
269 .br
270 Find out where a package installed its executables.
271
272 .SS
273 .BI "hasuse (h) [OPTIONS] " "USE"
274 List all installed packages that have a given \fIPKG\fP flag.
275
276 \fBNote\fP: \fBhasuse\fP does not currently have the ability to display if packages are built with the given USE flag or not. It can only list which packages have the flag as an option. (See \fIEXAMPLES\fP)
277
278 .IR "LOCAL OPTIONS" ":"
279 .HP
280 .B \-I, \-\-exclude-installed
281 .br
282 Exclude installed packages from being output.
283 .HP
284 .B \-o, \-\-overlay-tree
285 .br
286 Include package from overlays in the search path.
287 .HP
288 .B \-p, \-\-portage-tree
289 .br
290 Include all packages from the Portage tree in the search path. Use this option to search through all standard Gentoo packages, including those that are not installed.
291 .P
292 .IR "OUTPUT" ":"
293 .HP
294 (See \fIOUTPUT\fP for \fBlist\fP below)
295 .P
296 .IR "EXAMPLES" ":"
297 .EX
298 .HP
299 equery hasuse -pI perl
300 .EE
301 .br
302 View all Gentoo packages that have the "perl" USE flag, exluding installed packages.
303 .EX
304 .HP
305 USE="perl"; for PKG in $(equery -q hasuse $USE); do echo $PKG: $(equery -q uses $PKG |grep $USE); done
306 .EE
307 .br
308 This Bash one-liner uses \fBhasuse\fP to find a list of packages that have a certain USE flag, and \fBuses\fP to check whether the flag is enabled or disabled. Modify \fBUSE="perl"\fP to change the query.
309
310 .SS
311 .BI "list (l) [OPTIONS] " "PKG"
312 List installed versions of \fIPKG\fP or all packages matching the query pattern.
313
314 .IR "LOCAL OPTIONS" ":"
315 .HP
316 .B \-d, \-\-duplicates
317 .br
318 List only packages with more than one version installed.
319 .HP
320 .B \-f, \-\-full-regex
321 .br
322 The supplied query is a regular expression.
323 .HP
324 .B \-m, \-\-mask-reason
325 .br
326 Print the reason why a package was masked.
327 .HP
328 .B \-I, \-\-exclude-installed
329 .br
330 Exclude installed packages from being output.
331 .HP
332 .B \-o, \-\-overlay-tree
333 .br
334 Include package from overlays in the search path.
335 .HP
336 .B \-p, \-\-portage-tree
337 .br
338 Include all packages from the Portage tree in the search path. Use this option to search through all standard Gentoo packages, including those that are not installed.
339 .P
340 .IR "OUTPUT" ":"
341
342 .EX
343 $ equery list binutils
344  * Searching for binutils ...
345  [I--] [??] sys-devel/binutils-2.18-r1:i686-pc-linux-gnu-2.18
346  [IP-] [ ~] sys-devel/binutils-2.19.1-r1:i686-pc-linux-gnu-2.19.1
347 .EE
348 .HP
349 Location field (\fB[IPO-]\fP):
350 .br
351 The first field shows the location and install status of the package. It consists of three letters in square brackets. \fBI\fP indicates the package is currently installed. \fBP\fP indicates the package is available in the Portage tree. \fBO\fP indicates the package is available in at least one overlay. \fB-\fP is a place holder and has no meaning. \fB[I-O]\fP would mean that the package is installed and available from an overlay, but not available from the Portage tree.
352 .HP
353 Mask-status field (\fB[ ~M-??]\fP):
354 .br
355 The second field shows the mask status of the package. Empty brackets indicate that the package is unmasked. A \fB~\fP means the package is masked by keyword, e.g., you are running a stable system and the package is marked testing). \fBM\fP means hard masked, e.g., the package maintainer has determined the package is unfit for widespread usage. \fB-\fP means arch masked, e.g., you are running an amd64 system, but this package only works on x86. Lastly, \fB??\fP only occurs when the location field is \fB[I--]\fP. Together, they indicate that the package was installed from the Portage tree or an overlay, but has since been removed from that tree; therefore \fBequery\fP can not determine a mask status for it.
356 .HP
357 Package name:
358 .br
359 The third field is the full package name and version.
360 .HP
361 Slot:
362 .br
363 The fourth field, after the colon, is the package's slot. \fB0\fP is the default slot. To find all packages with multiple slots installed, use \fB--duplicates\fP.
364 .P
365 \fBNote:\fP Because it takes extra processing time to determine the location, mask status and slot, you can speed up output by passing the \fB--quiet\fP global option to \fBequery\fP when you don't care about the extra information.
366
367 .P
368 .IR "EXAMPLES" ":"
369 .EX
370 .HP
371 equery list '*'
372 .EE
373 .br
374 List all installed packages. This is equivalent to '\fBequery list\fP' in \fBGentoolkit\fP versions prior to 0.3.0.
375 .EX
376 .HP
377 equery list -op mozilla-firefox
378 .EE
379 .br
380 List all available versions of the package exactly matching 'mozilla-firefox'. This is equivalent to '\fBequery list --exact-name -o -p mozilla-firefox\fP' in \fBGentoolkit\fP versions prior to 0.3.0.
381 .EX
382 .HP
383 equery list '*zilla*'
384 .EE
385 .br
386 List all packages that contain (fuzzy match) 'zilla'. This is equivalent to '\fBequery list zilla\fP' in \fBGentoolkit\fP versions prior to 0.3.0.
387 .EX
388 .HP
389 equery list 'www-client/*'
390 .EE
391 .br
392 List all packages in the category \fBwww-client\fP. This is equivalent to '\fBequery list --category=www-client\fP' in \fBGentoolkit\fP versions prior to 0.3.0.
393 .EX
394 .HP
395 equery list --duplicates '*'
396 .EE
397 .br
398 List all packages with more than one version installed. This is equivalent to '\fBequery list --duplicates\fP' in \fBGentoolkit\fP versions prior to 0.3.0.
399
400 .SS
401 .BI "meta (m) [OPTIONS] " "PKG"
402 Display metadata about \fIPKG\fP.
403
404 \fBmeta\fP reads a file called metadata.xml which must be included with all Portage tree packages. \fBmeta\fP does not read ebuilds, so it can only return version independent metadata. Since until now there had not been an easy way for users to view metadata.xml, and because package maintainers are only required to fill out a very small portion of the file, there are still many packages without detailed metadata available. For more information about metadata.xml, see:
405 .br
406 .EX
407 http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=4
408 .EE
409
410 .IR "LOCAL OPTIONS" ":"
411 .HP
412 .B \-d, \-\-description
413 .br
414 Show an extended package description.
415 .HP
416 .B \-H, \-\-herd
417 .br
418 Show the herd(s) for the package. When not piping and not passing \fB--quiet\fP as a global option, also show the herd's email address. (shown by default)
419 .HP
420 .B \-k, \-\-keywords
421 .br
422 Show keywords for all matching versions. \fBkeywords\fP does not list all keywords for all versions. Instead, it filters the list to make it easier to spot versions that need bumping or are okay to remove from the tree. It filters by slot. For example:
423 .br
424 Keywords:    1.35.0-r3:\fB0\fP:
425 .br
426 Keywords:    1.35.0-r5:\fB0\fP: amd64 hppa ppc x86 ~alpha ~arm ~ia64 ~mips ~ppc64 ~s390 ~sh ~sparc
427 .br
428 In this output from \fBequery meta boost\fP, -r5 is the highest available version in slot 0, so all keywords are listed. The actual keywords for -r3 are "~amd64 ~hppa ~ppc ~x86", but since a higher version in the same slot has the same or more stable keywording, they are filtered out. Arch mask keywords (-*) are always shown.
429 .HP
430 .B \-m, \-\-maintainer
431 .br
432 Show the package maintainer(s) email address. If the metadata is available, also show the maitainer's name and/or job description. (shown by default)
433 .HP
434 .B \-u, \-\-useflags
435 .br
436 Show per-package USE flag descriptions. Per-package USE flag descriptions are sometimes added to metadata.xml if the affect of the USE flag is unusual, or if the USE flag is rare enough to be undefined in the global definition file. \fBequery uses\fP now displays these same local descriptions as well, so this option is left in \fBmeta\fP for completeness only.
437 .HP
438 .B \-U, \-\-upstream
439 .br
440 Show information about the package's upstream project, including the author's email, upstream bug tracker or upstream documentation. At the time of writing, most maintainers do not provide this information. (shown by default)
441 .HP
442 .B \-x, \-\-xml
443 .br
444 Dump the plain XML file to the screen.
445 .P
446 .IR "EXAMPLES" ":"
447 .EX
448 .HP
449 equery meta gnucash
450 .EE
451 .br
452 Show general information about maintainership, including herd, maintainer and upstream.
453 .EX
454 .HP
455 equery meta --description screen
456 .EE
457 .br
458 See if the package maintainer has provided an extended description.
459 .EX
460 .HP
461 equery -N meta -H gnome |grep -o --color=never '[^( ]*@gentoo.org'
462 .EE
463 .br
464 Extract the herd's email address to let them know they're doing a great job. Remember, bug reports should go to bugs.gentoo.org. The above example will extract one or more emails if available, or return nothing if the herd is \fBno-herd\fP.
465
466 .SS
467 .BI "size (s) [OPTIONS] " "PKG"
468 Print total size of files contained in a given \fIPKG\fP.
469
470 .IR "LOCAL OPTIONS" ":"
471 .HP
472 .B \-b, \-\-bytes
473 .br
474 Report package size in bytes.
475 .HP
476 .B \-f, \-\-full-regex
477 .br
478 The query is a regular expression.
479 .P
480 .IR "EXAMPLES" ":"
481 .EX
482 .HP
483 equery -q size 'www-client/*'
484 .EE
485 .br
486 Get a one-line summary of the number of files and total size (in bytes) of those files for each installed package in a category.
487
488 .SS
489 .BI "uses (u) [OPTIONS] " "PKG"
490 Display USE flag statuses and desriptions for a given \fRPKG\fP.
491
492 .IR "LOCAL OPTIONS" ":"
493 .HP
494 .B \-a, \-\-all
495 .br
496 Display all package versions. Without this option, \fBequery\fP will choose the best available version.
497 .P
498 .IR "EXAMPLES" ":"
499 .EX
500 .HP
501 equery uses app-misc/beagle
502 .EE
503 .br
504 See which USE flags are enabled for a specific package.
505 .EX
506 .HP
507 USE="perl"; for PKG in $(equery -q hasuse $USE); do echo $PKG: $(equery -q uses $PKG |grep $USE); done
508 .EE
509 .br
510 This Bash one-liner uses \fBhasuse\fP to find a list of packages that have a certain USE flag, and \fBuses\fP to check whether the flag is enabled or disabled. Modify \fBUSE="perl"\fP to change the query.
511
512 .SS
513 .BI "which (w) [OPTIONS] " "PKG"
514 Display the path to the ebuild that would be used by Portage with the current configuation.
515
516 .IR "LOCAL OPTIONS" ":"
517 .HP
518 .B \-m, \-\-include-masked
519 .br
520 Return the path to the hightest version ebuild available.
521 .P
522 .IR "EXAMPLES" ":"
523 .EX
524 .HP
525 less $(equery which xorg-server)
526 .EE
527 .br
528 View the most recent installable ebuild.
529
530 .SH "BUGS"
531 Submit bug reports to http://bugs.gentoo.org.
532
533 .SH "AUTHORS"
534 Karl Trygve Kalleberg <karltk@gentoo.org>, 2003
535 .br
536 Katerina Barone\-Adesi <katerinab@gmail.com>, 2004
537 .br
538 Douglas Anderson <douglasjanderson@gmail.com>, 2009