/[gentoo]/xml/htdocs/doc/en/gentoolkit.xml
Gentoo

Diff of /xml/htdocs/doc/en/gentoolkit.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.35 Revision 1.36
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoolkit.xml,v 1.35 2011/08/15 19:29:48 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoolkit.xml,v 1.36 2011/08/15 19:30:36 swift Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide> 5<guide>
6<title>Gentoolkit</title> 6<title>Gentoolkit</title>
7 7
39</abstract> 39</abstract>
40 40
41<!-- Licensed under GFDL --> 41<!-- Licensed under GFDL -->
42 42
43<version>4</version> 43<version>4</version>
44<date>2011-08-15</date> 44<date>2011-08-16</date>
45 45
46<chapter> 46<chapter>
47<title>Introduction</title> 47<title>Introduction</title>
48<section> 48<section>
49<title>What is Gentoolkit?</title> 49<title>What is Gentoolkit?</title>
115<title>Introduction</title> 115<title>Introduction</title>
116<body> 116<body>
117 117
118<p> 118<p>
119<c>equery</c> is a tool that displays useful information about the packages on 119<c>equery</c> is a tool that displays useful information about the packages on
120your system. <c>equery</c> is based on a system of modules. 120your system. <c>equery</c> is based on a system of modules.
121Every module has a shorthand name. For example, <c>equery l gcc</c> is the same 121Every module has a shorthand name. For example, <c>equery l gcc</c> is the same
122as <c>equery list gcc</c>. <c>equery --help</c> explains global options 122as <c>equery list gcc</c>. <c>equery --help</c> explains global options
123and lists all available modules and their shorthand names. 123and lists all available modules and their shorthand names.
124<c>equery --help module</c> will display the help screen for a specific 124<c>equery --help module</c> will display the help screen for a specific
125module. Lastly, <c>man equery</c> provides a detailed explanation of all 125module. Lastly, <c>man equery</c> provides a detailed explanation of all
126available modules and options, and provides useful examples. 126available modules and options, and provides useful examples.
127</p> 127</p>
128 128
153 * Checking www-client/mozilla-firefox-3.0.14 ... 153 * Checking www-client/mozilla-firefox-3.0.14 ...
154 90 out of 90 files passed 154 90 out of 90 files passed
155 155
156<comment>(Most equery modules take multiple input):</comment> 156<comment>(Most equery modules take multiple input):</comment>
157$ <i>equery hasuse sse sse2</i> 157$ <i>equery hasuse sse sse2</i>
158 * Searching for USE flag sse ... 158 * Searching for USE flag sse ...
159[IP-] [ ] media-libs/flac-1.2.1-r3 (0) 159[IP-] [ ] media-libs/flac-1.2.1-r3 (0)
160[IP-] [ ] media-libs/speex-1.2_beta3_p2 (0) 160[IP-] [ ] media-libs/speex-1.2_beta3_p2 (0)
161 161
162 * Searching for USE flag sse2 ... 162 * Searching for USE flag sse2 ...
163[IP-] [ ] dev-libs/openssl-0.9.8k (0) 163[IP-] [ ] dev-libs/openssl-0.9.8k (0)
164[IP-] [ ] x11-libs/pixman-0.16.0 (0) 164[IP-] [ ] x11-libs/pixman-0.16.0 (0)
165 165
166<comment>(A few modules also allow full regular expressions):</comment> 166<comment>(A few modules also allow full regular expressions):</comment>
167$ <i>equery -q list --portage-tree --full-regex '[kr]?flickr.*'</i> 167$ <i>equery -q list --portage-tree --full-regex '[kr]?flickr.*'</i>
173[...] 173[...]
174</pre> 174</pre>
175 175
176<note> 176<note>
177Globbing support replaced a number of older options in <c>equery</c>. 177Globbing support replaced a number of older options in <c>equery</c>.
178For example, to act on all packages in a certain set, use <c>'*'</c>. 178For example, to act on all packages in a certain set, use <c>'*'</c>.
179To act on all packages in a category, use <c>'category-name/*'</c>. 179To act on all packages in a category, use <c>'category-name/*'</c>.
180</note> 180</note>
181 181
182<warn> 182<warn>
183Don't forget to quote input when using special shell characters 183Don't forget to quote input when using special shell characters
184like asterisks or greater than/less than signs. 184like asterisks or greater than/less than signs.
185</warn> 185</warn>
186 186
187<p> 187<p>
188The next few sections in this document give a quick introduction to the 188The next few sections in this document give a quick introduction to the
195<title>Finding the Package That a File Came From with belongs (b)</title> 195<title>Finding the Package That a File Came From with belongs (b)</title>
196<body> 196<body>
197 197
198<pre caption="Finding the Package that Installed a Given File"> 198<pre caption="Finding the Package that Installed a Given File">
199$ <i>equery belongs -e /usr/bin/glxgears</i> 199$ <i>equery belongs -e /usr/bin/glxgears</i>
200 * Searching for /usr/bin/glxgears ... 200 * Searching for /usr/bin/glxgears ...
201 x11-apps/mesa-progs-7.5.1 (/usr/bin/glxgears) 201 x11-apps/mesa-progs-7.5.1 (/usr/bin/glxgears)
202</pre> 202</pre>
203 203
204<p> 204<p>
205<c>belongs</c> can search for files matching a regular expression with the 205<c>belongs</c> can search for files matching a regular expression with the
214<title>Viewing ChangeLog Entries with changes (c)</title> 214<title>Viewing ChangeLog Entries with changes (c)</title>
215<body> 215<body>
216 216
217<p> 217<p>
218<c>changes</c> lets you view ChangeLog entries for a package version or range 218<c>changes</c> lets you view ChangeLog entries for a package version or range
219of versions. Imagine after an <c>emerge --sync</c>, you 219of versions. Imagine after an <c>emerge --sync</c>, you
220notice Portage is going to be upgraded and want to check what has changed: 220notice Portage is going to be upgraded and want to check what has changed:
221</p> 221</p>
222 222
223<pre caption="Viewing Gentoo ChangeLog Entries"> 223<pre caption="Viewing Gentoo ChangeLog Entries">
224<comment>(Show the latest installable version's entry):</comment> 224<comment>(Show the latest installable version's entry):</comment>
282<p> 282<p>
283<c>depgraph</c> is the opposite of <c>depends</c>. You pass it a package, and 283<c>depgraph</c> is the opposite of <c>depends</c>. You pass it a package, and
284it will find the packages <e>it</e> depends on (not that depend on it). 284it will find the packages <e>it</e> depends on (not that depend on it).
285When it finds a dependency, it will recursively search for all of 285When it finds a dependency, it will recursively search for all of
286<e>that</e> package's dependencies. Control how deep the tree gets with 286<e>that</e> package's dependencies. Control how deep the tree gets with
287the <c>--depth</c> option. 287the <c>--depth</c> option.
288</p> 288</p>
289 289
290<pre caption="Viewing Dependency Graph for mozilla-firefox"> 290<pre caption="Viewing Dependency Graph for mozilla-firefox">
291$ <i>equery depgraph mozilla-firefox</i> 291$ <i>equery depgraph mozilla-firefox</i>
292 * Searching for mozilla-firefox ... 292 * Searching for mozilla-firefox ...
371<body> 371<body>
372 372
373<p> 373<p>
374You can use <c>hasuse</c> to find out which packages have a given USE flag. 374You can use <c>hasuse</c> to find out which packages have a given USE flag.
375<c>hasuse</c> won't tell you if the flag is enabled, only if the ebuild lists 375<c>hasuse</c> won't tell you if the flag is enabled, only if the ebuild lists
376it as an option. See the EXAMPLES section of <c>hasuse</c> in the 376it as an option. See the EXAMPLES section of <c>hasuse</c> in the
377<c>equery</c> man page for more tip on getting that information. 377<c>equery</c> man page for more tip on getting that information.
378</p> 378</p>
379 379
380<pre caption="Searching For Installed Packages that Use the qt3 or qt4 USE Flags"> 380<pre caption="Searching For Installed Packages that Use the qt3 or qt4 USE Flags">
381$ <i>equery hasuse qt3 qt4</i> 381$ <i>equery hasuse qt3 qt4</i>
382 * Searching for USE flag qt3 ... 382 * Searching for USE flag qt3 ...
383[IP-] [ ] app-crypt/pinentry-0.7.5 (0) 383[IP-] [ ] app-crypt/pinentry-0.7.5 (0)
384[IP-] [ ] net-dns/avahi-0.6.24-r2 (0) 384[IP-] [ ] net-dns/avahi-0.6.24-r2 (0)
385[IP-] [ ] net-wireless/wpa_supplicant-0.6.9 (0) 385[IP-] [ ] net-wireless/wpa_supplicant-0.6.9 (0)
386 386
387 * Searching for USE flag qt4 ... 387 * Searching for USE flag qt4 ...
388[IP-] [ ] net-dns/avahi-0.6.24-r2 (0) 388[IP-] [ ] net-dns/avahi-0.6.24-r2 (0)
389[IP-] [ ] net-wireless/wpa_supplicant-0.6.9 (0) 389[IP-] [ ] net-wireless/wpa_supplicant-0.6.9 (0)
390</pre> 390</pre>
391 391
392</body> 392</body>
394<section> 394<section>
395<title>Listing Packages with list (l)</title> 395<title>Listing Packages with list (l)</title>
396<body> 396<body>
397 397
398<p> 398<p>
399<c>list</c> is a simple, yet powerful module to list packages that are installed, 399<c>list</c> is a simple, yet powerful module to list packages that are
400in the Portage tree or in an overlay. 400installed, in the Portage tree or in an overlay.
401</p> 401</p>
402 402
403<pre caption="Listing Installed Packages with list"> 403<pre caption="Listing Installed Packages with list">
404$ <i>equery list '*'</i> 404$ <i>equery list '*'</i>
405 * Searching for * ... 405 * Searching for * ...
418[...] 418[...]
419</pre> 419</pre>
420 420
421<p> 421<p>
422The standard query will search installed packages for the given package name. 422The standard query will search installed packages for the given package name.
423Passing in '*' displays all packages in the set. In the leftmost field, we 423Passing in '*' displays all packages in the set. In the leftmost field, we
424see that all the above packages are <c>I</c>nstalled and from the <c>P</c>ortage 424see that all the above packages are <c>I</c>nstalled and from the <c>P</c>ortage
425tree. They're not masked (the second field is blank), and they're all installed 425tree. They're not masked (the second field is blank), and they're all installed
426in the default slot (0). 426in the default slot (0).
427</p> 427</p>
428 428
445[-P-] [ ~] app-editors/vim-7.2.264 (0) 445[-P-] [ ~] app-editors/vim-7.2.264 (0)
446</pre> 446</pre>
447 447
448<p> 448<p>
449In this example you can see version 7.2.182 is installed and there are no 449In this example you can see version 7.2.182 is installed and there are no
450versions available from an overlay. You can see which versions are keyword 450versions available from an overlay. You can see which versions are keyword
451masked by the <c>~</c> in the second field. 451masked by the <c>~</c> in the second field.
452</p> 452</p>
453 453
454</body> 454</body>
455</section> 455</section>
457<title>Viewing Package Metadata with meta (m)</title> 457<title>Viewing Package Metadata with meta (m)</title>
458<body> 458<body>
459 459
460<p> 460<p>
461Each package in the Portage tree provides at least some metadata about 461Each package in the Portage tree provides at least some metadata about
462its maintainer, herd, etc. Read about <uri 462its maintainer, herd, etc. Read about <uri
463link="http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&amp;chap=4">Gentoo 463link="http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&amp;chap=4">
464Metadata</uri>. The amount of useful information depends on how much package 464Gentoo Metadata</uri>. The amount of useful information depends on how much
465maintainers decide to provide. With no options, <c>meta</c> returns some basic 465package maintainers decide to provide. With no options, <c>meta</c> returns
466useful information. 466some basic useful information.
467</p> 467</p>
468 468
469<pre caption="Getting Package Metadata with meta"> 469<pre caption="Getting Package Metadata with meta">
470$ <i>equery meta gnucash</i> 470$ <i>equery meta gnucash</i>
471 * app-office/gnucash [gentoo] 471 * app-office/gnucash [gentoo]
472 Herd: gnome-office (gnome-office@gentoo.org) 472 Herd: gnome-office (gnome-office@gentoo.org)
473 Maintainer: tove@gentoo.org (Torsten Veller) 473 Maintainer: tove@gentoo.org (Torsten Veller)
474 Upstream: None specified 474 Upstream: None specified
475 Location: /usr/portage/app-office/gnucash 475 Location: /usr/portage/app-office/gnucash
476 Keywords: 2.2.9-r1:0: alpha amd64 ppc sparc x86 476 Keywords: 2.2.9-r1:0: alpha amd64 ppc sparc x86
477 Keywords: 2.2.9-r2:0: 477 Keywords: 2.2.9-r2:0:
478 Keywords: 2.3.8:0: 478 Keywords: 2.3.8:0:
479 Keywords: 2.3.10:0: ~alpha ~amd64 ~ppc ~sparc ~x86 479 Keywords: 2.3.10:0: ~alpha ~amd64 ~ppc ~sparc ~x86
480</pre> 480</pre>
481 481
482<p> 482<p>
483When the maintainer provides extra information, it can be very useful: 483When the maintainer provides extra information, it can be very useful:
597$ <i>equery which gnome</i> 597$ <i>equery which gnome</i>
598/usr/portage/gnome-base/gnome/gnome-2.26.3.ebuild 598/usr/portage/gnome-base/gnome/gnome-2.26.3.ebuild
599</pre> 599</pre>
600 600
601<p> 601<p>
602Lastly, if none of the above features of <c>equery</c> have answered your 602Lastly, if none of the above features of <c>equery</c> have answered your
603question, try using <c>which</c> to manually search an ebuild with programs 603question, try using <c>which</c> to manually search an ebuild with programs
604like <c>cat</c>, <c>less</c> or <c>grep</c>: 604like <c>cat</c>, <c>less</c> or <c>grep</c>:
605</p> 605</p>
606 606
607<pre caption="Other Useful Ways to Use which"> 607<pre caption="Other Useful Ways to Use which">
608$ <i>grep HOMEPAGE $(equery which gentoolkit)</i> 608$ <i>grep HOMEPAGE $(equery which gentoolkit)</i>
609HOMEPAGE="http://www.gentoo.org/proj/en/portage/tools/index.xml" 609HOMEPAGE="http://www.gentoo.org/proj/en/portage/tools/index.xml"
610</pre> 610</pre>
611 611
612<warn> 612<warn>
613Be aware that equery currently changes the format of the output if it is sent 613Be aware that <c>equery</c> currently changes the format of the output if it
614through a pipe. The piped format is intended to be easier to parse by tools, but 614is sent through a pipe. The piped format is intended to be easier to parse by
615you can also turn it off by adding the <c>--no-pipe</c> option. If you write 615tools, but you can also turn it off by adding the <c>--no-pipe</c> option. If
616scripts that employ equery, you should be aware of this. 616you write scripts that employ <c>equery</c>, you should be aware of this.
617</warn> 617</warn>
618 618
619</body> 619</body>
620</section> 620</section>
621</chapter> 621</chapter>

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

  ViewVC Help
Powered by ViewVC 1.1.20