1 .TH "EQUERY" "1" "August 2009" "GENTOOLKIT" ""
3 equery \- Gentoo Package Query Tool
6 .BI "equery " "[global\-options] " "module " "[local\-options]"
10 is a collection of modules for querying the state of Gentoo packages, files and USE flags.
16 Output a help message.
20 Be less verbose where possible. In some modules, this option can increase the output speed.
24 Do not colorize output.
28 Turn off automatic pipe detection. Use this option if you do not want
30 to detect if the output is being directed to the screen or to another program and adjust color and verbosity accordingly.
34 Display \fBGentoolkit\fP's version. Please include this in all bug reports. (see
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.
44 message for a specific module by using
45 .BR "\-h" ", " "\-\-help "
46 as either a global option (after
48 and before the module name) or as a local option (after the module name).
51 .BI "belongs (b) [OPTIONS] " "FILE"
52 List the package that owns \fIFILE\fP.
55 Normally, only one package will own \fIFILE\fP. If multiple packages own the
56 same file it should be reported. (see
60 .I R "LOCAL OPTIONS" ":"
62 .B \-f, \-\-full\-regex
64 The supplied query is a regular expression.
66 .B \-e, \-\-early\-out
68 Stop when the first match is found. This is generally a safe optimization when searching for the owner of a single file.
70 .B \-n, \-\-name\-only
72 Do not print the version.
77 equery belongs \-\-early\-out /usr/bin/euse
80 Find out what package installed a certain command.
83 emerge \-p $(equery \-q belongs \-nf '^/usr/bin/g?vim.*')
88 to reinstall or update any package that installed a file matching a regular expression.
91 .BI "changes (c) [OPTIONS] " "PKG"
92 Display the Gentoo ChangeLog entry for the latest installable version of \fIPKG\fP.
94 .I R "LOCAL OPTIONS" ":"
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.
102 Display the full ChangeLog.
104 \fBHint\fP: Try piping (|) the output to a pager, like 'less'.
106 .BI "\-\-limit=" "NUM"
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.
110 .BI "\-\-from=" "VER"
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.
116 Set which \fIVER\fP to display to. (See \fB\-\-from\fP)
121 equery changes portage
124 Display the Gentoo ChangeLog entry for the latest installable version of Portage.
127 equery changes '=sys\-apps/portage\-2.1.6*'
130 Use Portage's atom syntax. (See \fBman 5 ebuild\fP)
133 equery changes portage \-\-from=2.2_rc1 \-\-to=2.2
136 Display any ChangeLog entry within a range of versions.
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.
142 .I R "LOCAL OPTIONS" ":"
144 .B \-f, \-\-full\-regex
146 The supplied query is a regular expression.
148 .B \-o, \-\-only\-failures
150 Only display packages which don't pass all checks.
155 equery check \-\-only\-failures '*'
158 Verify timestamps and MD5 sums for all installed packages and show only packages which fail checks.
161 equery check 'dev\-python/*' dev\-lang/python
164 Verify every installed package in the \fBdev\-python\fP category, and Python itself.
167 .BI "depends (d) [OPTIONS] " "PKG"
168 List all packages that depend on \fIPKG\fP.
170 .I R "LOCAL OPTIONS" ":"
172 .B \-a, \-\-all\-packages
174 Include dependencies that are not installed. This can take a while.
178 Search for both direct and indirect dependencies.
180 .BI "\-\-depth=" "NUM"
182 Limit the indirect dependency tree to a depth of \fINUM\fP. \fB\-\-depth=0\fP is equivalent to not using \fB\-\-indirect\fP.
187 equery depends \-\-indirect xulrunner
190 Figure out why a package got installed on your system.
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.
197 .I R "LOCAL OPTIONS" ":"
201 Do not show the dependency atom that match the package.
203 .B \-U, \-\-no\-useflags
205 Do not show USE flags.
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
213 .BI "\-\-depth=" "NUM"
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.
221 equery depgraph \-\-depth=0 portage
224 View a full tree of all direct and indirect compile\-time, run\-time, and post\-merge dependencies for a package.
227 .BI "files (f) [OPTIONS] " "PKG"
228 List files and directories installed by \fIPKG\fP.
230 .I R "LOCAL OPTIONS" ":"
234 Include the file's MD5 sum in the output.
236 .B \-s, \-\-timestamp
238 Include the file's timestamp in the output.
242 Include the file type in the output.
246 Display files in a tree format. This option turns off all other local options.
248 .BI "\-f, \-\-filter=" "RULES"
250 Filter output by file type.
254 A comma\-separated list (no spaces); choose from:
256 .B dir, obj, sym, dev, path, conf, cmd, doc, man, info
261 equery files \-\-tree vlc
264 View a file tree of all files installed by a package.
267 equery files \-\-filter=cmd vlc
270 Find out where a package installed its executables.
273 .BI "has (a) [OPTIONS] " "KEY VALUE"
274 List all installed packages that have a given \fIPKG\fP match.
276 \fBNote\fP: \fBKEY\fP is case sensitive. Also \fBhas\fP does not currently have the ability to inteligently compare values dependending on the type of information being looked up. It performs a simple string match. It can only list which packages have the matching \fBVALUE\fP as given on the command line. It is a general purpose lookup for most information available via portage's dbapi.aux_get() function. Warning the quality of the results printed is dependant on the quality of the search (given the limited comparison method) and the recorded data available in the vardb. (See \fIEXAMPLES\fP)
278 .I R "LOCAL OPTIONS" ":"
280 .B \-I, \-\-exclude\-installed
282 Exclude installed packages from being output.
284 .B \-o, \-\-overlay\-tree
286 Include package from overlays in the search path.
288 .B \-p, \-\-portage\-tree
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.
292 .B \-F, \-\-format=\fITMPL\fP
294 Customize the output format of the matched packages using the template string \fITMPL\fP. See the \fB\-\-format\fP option for \fBlist\fP below for a description of the \fITMPL\fP argument.
298 (See \fIOUTPUT\fP for \fBlist\fP below)
306 View all installed Gentoo packages that have a recorded SLOT = "2.4".
309 equery has repository sunrise
312 View all installed Gentoo packages that were recorded to be installed from ebuilds from the "sunrise" overlay.
318 View all installed Gentoo packages that were installed with ebuilds with a recorded EAPI of "2".
321 .BI "hasuse (h) [OPTIONS] " "USE"
322 List all installed packages that have a given \fIPKG\fP flag.
324 \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)
326 .I R "LOCAL OPTIONS" ":"
328 .B \-I, \-\-exclude\-installed
330 Exclude installed packages from being output.
332 .B \-o, \-\-overlay\-tree
334 Include package from overlays in the search path.
336 .B \-p, \-\-portage\-tree
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.
340 .B \-F, \-\-format=\fITMPL\fP
342 Customize the output format of the matched packages using the template string \fITMPL\fP. See the \fB\-\-format\fP option for \fBlist\fP below for a description of the \fITMPL\fP argument.
346 (See \fIOUTPUT\fP for \fBlist\fP below)
351 equery hasuse \-pI perl
354 View all Gentoo packages that have the "perl" USE flag, exluding installed packages.
357 USE="perl"; for PKG in $(equery \-q hasuse $USE); do echo $PKG: $(equery \-q uses $PKG |grep $USE); done
360 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.
363 .BI "list (l) [OPTIONS] " "PKG"
364 List installed versions of \fIPKG\fP or all packages matching the query pattern.
366 .I R "LOCAL OPTIONS" ":"
368 .B \-d, \-\-duplicates
370 List only packages with more than one version installed.
372 .B \-f, \-\-full\-regex
374 The supplied query is a regular expression.
376 .B \-m, \-\-mask\-reason
378 Print the reason why a package was masked.
380 .B \-I, \-\-exclude\-installed
382 Exclude installed packages from being output.
384 .B \-o, \-\-overlay\-tree
386 Include package from overlays in the search path.
388 .B \-p, \-\-portage\-tree
390 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.
392 .B \-F, \-\-format=\fITMPL\fP
394 Customize the output format of the matched packages using the template string \fITMPL\fP. \fITMPL\fP can contain the following placeholders:
397 \fB$cp\fP \- Contains the category and the package name only (e.g 'app\-portage/gentoolkit').
399 \fB$cpv\fP \- Contains the category, the package name and the full version (e.g. 'app\-portage/gentoolkit\-0.3.0_rc10\-r1').
401 \fB$category\fP \- Contains just the category (e.g. 'app\-portage').
403 \fB$name\fP \- Contains just the package name (e.g. 'gentoolkit').
405 \fB$version\fP \- Contains the package version (without the revision) (e.g. '0.3.0_rc10').
407 \fB$revision\fP \- Contains the package revision (e.g. 'r1').
409 \fB$fullversion\fP \- Contains the package version including its revision (e.g. '0.3.0_rc10\-r1').
411 \fB$slot\fP \- Contains the package's slot.
413 \fB$repo\fP \- Contains the name of the package's repository (e.g. 'gentoo').
415 \fB$mask\fP \- The Mask\-status field (\fB~M\-??\fP), see \fIOUTPUT\fP below for an explanation.
417 \fB$mask2\fP \- Contains a verbose description of the packages masking status.
419 \fB$location\fP \- The Location field (\fBIPO\-\fP), see \fIOUTPUT\fP below for an explanation.
421 Apart from the above placeholders the template string can contain arbitrary
422 text as desired. Similar to bash variables, curly braces can be used to
423 disambiguate the variable names from the enclosing text.
429 $ equery list binutils
430 * Searching for binutils ...
431 [I\-\-] [??] sys\-devel/binutils\-2.18\-r1:i686\-pc\-linux\-gnu\-2.18
432 [IP\-] [ ~] sys\-devel/binutils\-2.19.1\-r1:i686\-pc\-linux\-gnu\-2.19.1
435 Location field (\fB[IPO\-]\fP):
437 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.
439 Mask\-status field (\fB[ ~M\-??]\fP):
441 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.
445 The third field is the full package name and version.
449 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.
451 \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.
453 \fBNote:\fP Additionally, when using \-\-quiet, if no matches are found, instead of printing an error, the equery list module will return with an exit value of 3.
462 List all installed packages. This is equivalent to '\fBequery list\fP' in \fBGentoolkit\fP versions prior to 0.3.0.
465 equery list \-op mozilla\-firefox
468 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.
471 equery list '*zilla*'
474 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.
477 equery list 'www\-client/*'
480 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.
483 equery list \-\-duplicates '*'
486 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.
489 equery list \-F '$cp:$slot' '*'
492 Get a list of slotted atoms for all installed packages.
495 equery list \-po \-F '[$location] [$mask] $cpv:$slot [$repo]' '*'
498 Show all packages in the default (verbose) output format but also include their repository name.
501 .BI "meta (m) [OPTIONS] " "PKG"
502 Display metadata about \fIPKG\fP.
504 \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:
507 http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=4
510 .I R "LOCAL OPTIONS" ":"
512 .B \-d, \-\-description
514 Show an extended package description.
518 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)
522 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:
524 Keywords: 1.35.0\-r3:\fB0\fP:
526 Keywords: 1.35.0\-r5:\fB0\fP: amd64 hppa ppc x86 ~alpha ~arm ~ia64 ~mips ~ppc64 ~s390 ~sh ~sparc
528 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.
530 .B \-m, \-\-maintainer
532 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)
536 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.
540 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)
544 Dump the plain XML file to the screen.
552 Show general information about maintainership, including herd, maintainer and upstream.
555 equery meta \-\-description screen
558 See if the package maintainer has provided an extended description.
561 equery \-N meta \-H gnome |grep \-o \-\-color=never '[^( ]*@gentoo.org'
564 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.
567 .BI "size (s) [OPTIONS] " "PKG"
568 Print total size of files contained in a given \fIPKG\fP.
570 .I R "LOCAL OPTIONS" ":"
574 Report package size in bytes.
576 .B \-f, \-\-full\-regex
578 The query is a regular expression.
583 equery \-q size 'www\-client/*'
586 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.
589 .BI "uses (u) [OPTIONS] " "PKG"
590 Display USE flag statuses and descriptions for a given \fRPKG\fP.
592 .I R "LOCAL OPTIONS" ":"
596 Display all package versions. Without this option, \fBequery\fP will choose the best available version.
601 equery uses app\-misc/beagle
604 See which USE flags are enabled for a specific package.
607 USE="perl"; for PKG in $(equery \-q hasuse $USE); do echo $PKG: $(equery \-q uses $PKG |grep $USE); done
610 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.
613 .BI "which (w) [OPTIONS] " "PKG"
614 Display the path to the ebuild that would be used by Portage with the current configuration.
616 .I R "LOCAL OPTIONS" ":"
618 .B \-m, \-\-include\-masked
620 Return the path to the hightest version ebuild available.
625 less $(equery which xorg\-server)
628 View the most recent installable ebuild.
631 Submit bug reports to http://bugs.gentoo.org.
634 Karl Trygve Kalleberg <karltk@gentoo.org>, 2003
636 Katerina Barone\-Adesi <katerinab@gmail.com>, 2004
638 Douglas Anderson <douglasjanderson@gmail.com>, 2009