Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 269071 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-249 / +417 lines)
Line  Link Here
0
-- gentoolkit.xml
0
++ gentoolkit.xml
Lines 1-5 Link Here
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.33 2010/10/03 18:47:51 nightmorph Exp $ -->
2
<!-- $Header: $ -->
3
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4
4
5
<guide>
5
<guide>
Lines 29-34 Link Here
29
<author title="Editor">
29
<author title="Editor">
30
  <mail link="nightmorph@gentoo.org">Joshua Saddler</mail>
30
  <mail link="nightmorph@gentoo.org">Joshua Saddler</mail>
31
</author>
31
</author>
32
<author title="Editor">
33
  <mail link="douglasjanderson@gmail.com">Douglas Anderson</mail>
34
</author>
32
35
33
<abstract>
36
<abstract>
34
Gentoolkit is a suite of tools to ease the administration of a Gentoo system.
37
Gentoolkit is a suite of tools to ease the administration of a Gentoo system.
Lines 37-44 Link Here
37
40
38
<!-- Licensed under GFDL -->
41
<!-- Licensed under GFDL -->
39
42
40
<version>2</version>
43
<version>3</version>
41
<date>2010-10-03</date>
44
<date>2011-06-24</date>
42
45
43
<chapter>
46
<chapter>
44
<title>Introduction</title>
47
<title>Introduction</title>
Lines 113-362 Link Here
113
<body>
116
<body>
114
117
115
<p>
118
<p>
116
<c>equery</c> is a tool that displays a great deal of useful information about
119
<c>equery</c> is a tool that displays useful information about the packages on
117
the packages on your system and much more. <c>equery --help</c> gives you the
120
your system. <c>equery</c> is based on a system of modules. 
118
full set of options.
121
Every module has a shorthand name. For example <c>equery l gcc</c> is the same
122
as <c>equery list gcc</c>.  <c>equery --help</c> explains global options
123
 and lists all available modules and their shorthand names. 
124
 <c>equery --help module</c> will display the help screen for a specific
125
 module. Lastly, <c>man equery</c> provides a detailed explanation of all
126
 available modules and options, and provides useful examples.
119
</p>
127
</p>
120
128
121
<note>
129
<p>
122
Not all features listed by <c>equery --help</c> have been implemented yet.
130
Below is a list of features
123
Those that have not been, are mentioned clearly. You will also see that
131
that work over the majority of modules.
124
every command has a short option, e.g. <c>b</c> instead of <c>belongs</c>.
132
</p>
125
</note>
133
<pre caption="Examples of Acceptable Input">
134
<comment>(Many modules require a package argument. <c>equery</c> accepts all <c>emerge</c>-like input):</comment>
135
$ <i>equery --quiet list gcc</i>                  # <comment>package</comment>
136
sys-devel/gcc-4.3.2-r3
137
$ <i>equery --quiet list sys-devel/gcc</i>        # <comment>category/package</comment>
138
sys-devel/gcc-4.3.2-r3
139
$ <i>equery --quiet list '>=sys-devel/gcc-4'</i>  # <comment><e>atom</e> syntax</comment>
140
sys-devel/gcc-4.3.2-r3
141
142
<comment>(Like <c>emerge</c>, <c>equery</c> doesn't understand partial package names):</comment>
143
$ <i>equery check zilla</i>
144
!!! No package found matching zilla
145
146
<comment>(Unlike <c>emerge</c>, <c>equery</c> can accept shell-like globbing in the category and/or package name):</comment>
147
$ <i>equery check '*zilla*'</i>
148
 * Checking www-client/mozilla-firefox-3.0.14 ...
149
    90 out of 90 files passed
150
$ <i>equery check www-c*/*</i>
151
 * Checking www-client/links-2.2 ...
152
   30 out of 30 files passed
153
 * Checking www-client/mozilla-firefox-3.0.14 ...
154
   90 out of 90 files passed
155
156
<comment>(Most <c>equery</c> modules take multiple input):</comment>
157
$ <i>equery hasuse sse sse2</i>
158
 * Searching for USE flag sse ... 
159
[IP-] [  ] media-libs/flac-1.2.1-r3 (0)
160
[IP-] [  ] media-libs/speex-1.2_beta3_p2 (0)
161
162
 * Searching for USE flag sse2 ... 
163
[IP-] [  ] dev-libs/openssl-0.9.8k (0)
164
[IP-] [  ] x11-libs/pixman-0.16.0 (0)
165
166
<comment>(A few modules also allow full regular expressions):</comment>
167
$ <i>equery -q list --portage-tree --full-regex '[kr]?flickr.*'</i>
168
dev-dotnet/flickrnet-bin-2.2
169
dev-ruby/flickr-1.0.2-r1
170
dev-ruby/flickr-1.0.2-r2
171
dev-ruby/rflickr-20060201
172
media-gfx/kflickr-0.6
173
[...]
174
</pre>
126
175
127
<note>
176
<note>
128
Be aware that equery currently changes the format of the output if it is sent
177
Globbing support replaced a number of older options in <c>equery</c>.
129
through a pipe. The piped format is intended to be easier to parse by tools, but
178
 For example, to act on all packages in a certain set, use <i>'*'</i>. 
130
you can also turn it off by adding the <c>--no-pipe</c> option. If you write
179
To act on all packages in a category, use <i>'category-name/*'</i>.
131
scripts that employ equery, you should be aware of this.
132
</note>
180
</note>
133
181
182
<warn>Don't forget to quote input when using special shell characters 
183
like asterisks or greater than/less than signs.</warn>
184
185
<p>Below is a quick introduction to the different <c>equery</c> modules.</p>
186
134
</body>
187
</body>
135
</section>
188
</section>
136
<section>
189
<section>
137
<title>Finding the Package That a File Came From</title>
190
<title>Finding the Package That a File Came From with belongs (b)</title>
138
<body>
191
<body>
139
192
193
<pre caption="Finding the Package that Installed a Given File">
194
$ <i>equery belongs -e /usr/bin/glxgears</i>
195
 * Searching for /usr/bin/glxgears ... 
196
 x11-apps/mesa-progs-7.5.1 (/usr/bin/glxgears)
197
</pre>
198
140
<p>
199
<p>
141
<c>equery</c> also provides the functionality of finding the package that a
200
<c>belongs</c> can search for files matching a regular expression with the
142
file came from, using <c>belongs</c> command (or just <c>b</c>).
201
<c>-f</c> option. The <c>-e</c> option stops searching after it finds a match.
202
Since no file on your system should be owned by two packages, this is a safe
203
optimization.
143
</p>
204
</p>
144
205
145
<pre caption="Finding the ebuild that installed a given file">
206
</body>
146
# <i>equery belongs /usr/bin/audacious</i>
207
</section>
147
[ Searching for file(s) /usr/bin/audacious in *... ]
208
<section>
148
media-sound/audacious-1.1.2 (/usr/bin/audacious)
209
<title>Viewing ChangeLog Entries with changes (c)</title>
149
</pre>
210
<body>
150
211
151
<p>
212
<p>
152
By using the <c>-f</c> option, you may search for packages with files
213
<c>changes</c> lets you view ChangeLog entries for a package version or range
153
matching any regular expression. The <c>-e</c> option is useful for
214
 of versions. Imagine after an <c>emerge --sync</c>, you 
154
terminating your search immediately when a match is found.
215
notice Portage is going to be upgraded and want to check what has changed:
155
</p>
216
</p>
156
217
218
<pre caption="Viewing Gentoo ChangeLog Entries">
219
<comment>(Show the latest installable version's entry):</comment>
220
$ <i>equery changes portage</i>
221
*portage-2.1.6.13 (03 May 2009)
222
223
  03 May 2009; Zac Medico &lt;zmedico@gentoo.org&gt; +portage-2.1.6.13.ebuild:
224
  2.1.6.13 bump. This fixes bug #268398 (document econf automatic die)
225
  and bug #267104 (handle insufficient space interaction with userfetch).
226
  Bug #268228 tracks all bugs fixed since 2.1.6.11.
227
</pre>
228
157
</body>
229
</body>
158
</section>
230
</section>
159
<section>
231
<section>
160
<title>Verifying Package Integrity</title>
232
<title>Verifying Package Integrity with check (k)</title>
161
<body>
233
<body>
162
234
163
<p>
235
<p>
164
Sometimes it is useful to check a package's integrity. <c>equery</c> can
236
Sometimes it is useful to check a package's integrity. <c>equery</c> can
165
verify md5 sums as well as timestamps to indicate when a package might
237
verify MD5 sums as well as timestamps to indicate when a package might
166
have been corrupted, replaced, or removed.
238
have been corrupted, replaced, or removed.
167
</p>
239
</p>
168
240
169
<pre caption="OK package integrity">
241
<pre caption="Checking Package Integrity">
170
# <i>equery check gentoolkit</i>
242
$ <i>equery check gentoolkit</i>
171
[ Checking app-portage/gentoolkit-0.2.0 ]
243
 * Checking app-portage/gentoolkit-0.3.0_rc7 ...
172
 * 54 out of 54 files good
244
   71 out of 71 files passed
173
</pre>
245
</pre>
174
246
175
<p>
176
Please note that if you change configuration files after installation,
177
these may be reported as "not good".
178
</p>
179
180
</body>
247
</body>
181
</section>
248
</section>
182
<section>
249
<section>
183
<title>List of all packages depending on ...</title>
250
<title>Listing All Packages Depending on Package X with depends (d)</title>
184
<body>
251
<body>
185
252
186
<p>
253
<p>
187
<c>equery</c> is able to list all direct dependencies matching a package.
254
Ever wonder why a certain package has been installed on your system?
188
The function we should use to do this is <c>depends</c> and it's as easy as:
255
 <c>equery</c> can tell which packages list it as a dependency with <c>depends</c>. Include indirect dependencies with the <c>-D</c>
256
option.
189
</p>
257
</p>
190
258
191
<pre caption="Looking for packages depending on pygtk">
259
<pre caption="Looking for Packages Depending on pygtk">
192
# <i>equery depends pygtk</i>
260
$ <i>equery depends pygtk</i>
193
[ Searching for packages depending on pygtk... ]
261
 * Searching for pygtk ...
194
app-office/dia-0.93
262
app-admin/pessulus-2.24.0 (>=dev-python/pygtk-2.6.0)
195
dev-python/gnome-python-2.0.0-r1
263
app-editors/gedit-2.24.3 (python ? >=dev-python/pygtk-2.12)
196
gnome-extra/gdesklets-core-0.26.2
264
dev-libs/libgweather-2.24.3 (python ? >=dev-python/pygtk-2)
197
media-gfx/gimp-2.0.4
265
dev-python/gnome-python-base-2.22.3 (>=dev-python/pygtk-2.10.3)
198
x11-libs/vte-0.11.11-r1
266
dev-python/gnome-python-desktop-base-2.24.1 (>=dev-python/pygtk-2.10.3)
267
[...]
199
</pre>
268
</pre>
200
269
201
</body>
270
</body>
202
</section>
271
</section>
203
<section>
272
<section>
204
<title>Dependency Graphs</title>
273
<title>Getting Dependency Graphs with depgraph (g)</title>
205
<body>
274
<body>
206
275
207
<p>
276
<p>
208
<c>equery</c> is capable of giving us a dependency graph for a specified
277
<c>depgraph</c> is the opposite of <c>depends</c>. You pass it a package, and
209
package. The dependency graph gives a listing of all the packages that have
278
it will find the packages <e>it</e> depends on (not that depend on it).
210
direct and indirect dependencies on the package in question.
279
 When it finds a dependency, it will recursively search for all of
211
</p>
280
 <e>that</e> package's dependencies. Control how deep the tree gets with
212
281
 the <c>--depth</c> option. 
213
<pre caption="Dependency Graph for cdrtools">
282
</p>
214
# <i>equery depgraph cdrtools</i>
283
215
Displaying dependencies for app-cdr/cdrtools-2.01_alpha37
284
<pre caption="Viewing Dependency Graph for cdrtools">
216
`-- app-cdr/cdrtools-2.01_alpha37
285
$ <i>equery depgraph mozilla-firefox</i>
217
 `-- sys-libs/glibc-2.3.4.20040808 (virtual/libc)
286
 * Searching for mozilla-firefox ...
218
  `-- sys-kernel/linux-headers-2.4.22 (virtual/os-headers)
287
 * dependency graph for www-client/mozilla-firefox-2.0.0.19:
219
   `-- sys-apps/baselayout-1.10.4
288
`-- www-client/mozilla-firefox-2.0.0.19
220
    `-- sys-apps/sysvinit-2.85-r1
289
 `-- virtual/jre-1.6.0 (virtual/jre) [java]
221
     `-- sys-apps/gawk-3.1.3-r1
290
  `-- virtual/jdk-1.6.0 (virtual/jdk-1.6.0*)
222
      `-- sys-apps/util-linux-2.12-r4
291
  `-- dev-java/icedtea6-bin (unable to resolve: package masked or removed)
223
          `-- sys-apps/sed-4.0.9
292
   `-- dev-java/sun-jdk-1.6.0.15
224
        `-- sys-libs/ncurses-5.4-r4
293
    `-- dev-java/java-sdk-docs-1.6.0.10 [doc]
225
            `-- sys-apps/pam-login-3.14
294
     `-- app-arch/unzip-6.0-r1
226
            `-- sys-libs/pam-0.77-r1
295
      `-- app-arch/bzip2-1.0.5-r1 [bzip2]
227
                 `-- sys-libs/cracklib-2.7-r10
296
    `-- sys-libs/glibc-2.9_p20081201-r2
228
               `-- sys-apps/miscfiles-1.3-r1
297
     `-- sys-devel/gettext-0.17 [nls]
229
              `-- app-arch/gzip-1.3.5-r1
298
      `-- virtual/libiconv-0 (virtual/libiconv)
230
              `-- sys-apps/portage-2.0.50-r10
299
[...]
231
</pre>
300
</pre>
232
301
233
<p>
302
<p>
234
For example, while glibc is a direct dependency for cdrtools,linux-headers
303
Notice how <c>jre</c> is a direct dependency and <c>jdk</c> is an indirect
235
are an indirect dependency. Note that the output also includes information
304
dependency if the <c>java</c> USE flag is set.
236
about virtual packages. In the example above, <c>cdrtools</c> is actually
237
written to require virtual/libc, not sys-libs/glibc, but on the given
238
system in the example sys-libs/glibc provides virtual/libc.
239
</p>
305
</p>
240
306
241
</body>
307
</body>
242
</section>
308
</section>
243
<section>
309
<section>
244
<title>Listing Files Belonging to an Ebuild</title>
310
<title>Listing Files Installed by a Package with files (f)</title>
245
<body>
311
<body>
246
312
247
<p>
313
<p>
248
<c>equery</c> can list the files that belong to an installed ebuild. If I
314
<c>equery</c> can list all the files installed by an ebuild with the
249
don't know the files that Gentoolkit has installed on the system, I will
315
<c>files</c> command. Try <c>--tree</c> to get an easy to read directory
250
use <c>equery</c> to show them.
316
layout. Use <c>--filter</c> to only find a certain type of file. For example,
251
</p>
317
to find where executables were installed, use <c>--filter=cmd</c>, and to
252
318
quickly find the configuration file location, try <c>--filter=conf</c>.
253
<pre caption="Listing files">
319
</p>
254
# <i>equery files gentoolkit</i>
320
255
[ Searching for packages matching gentoolkit... ]
321
<pre caption="Listing Installed Files in Tree Format">
256
app-portage/gentoolkit-0.2.0
322
$ <i>equery files --tree gentoolkit</i>
257
* Contents of app-portage/gentoolkit-0.2.0:
323
 * Searching for gentoolkit ...
258
/usr
324
 * Contents of app-portage/gentoolkit-0.3.0_rc7:
259
/usr/bin
325
 /etc
260
/usr/bin/equery
326
   > /eclean
261
/usr/bin/etcat
327
      + distfiles.exclude
262
/usr/bin/euse
328
      + packages.exclude
263
/usr/bin/glsa-check
329
   > /env.d
264
/usr/bin/qpkg
330
      + 99gentoolkit-env
265
/usr/bin/revdep-rebuild
331
   > /revdep-rebuild
266
/usr/lib
332
      + 99revdep-rebuild
267
/usr/lib/gentoolkit
333
 /usr
268
/usr/lib/gentoolkit/pym
334
   > /bin
269
/usr/lib/gentoolkit/pym/gentoolkit
335
      + eclean
270
/usr/lib/gentoolkit/pym/gentoolkit/__init__.py
336
      + eclean-dist -> eclean
271
/usr/lib/gentoolkit/pym/gentoolkit/gentoolkit.py
337
      + eclean-pkg -> eclean
272
/usr/lib/gentoolkit/pym/gentoolkit/pprinter.py
338
      + epkginfo
273
/usr/lib/gentoolkit/pym/glsa.py
339
      + equery
274
/usr/sbin
340
      + eread
275
/usr/share
341
      + euse
276
/usr/share/doc
342
      + glsa-check
277
/usr/share/doc/gentoolkit-0.2.0_pre10
343
      + revdep-rebuild
278
344
   > /lib
345
      > /python2.6
346
         > /site-packages
347
            > /gentoolkit
348
            + gentoolkit-0.3.0_rc7-py2.6.egg-info
349
               + __init__.py
350
               > /equery
351
                  + __init__.py
352
                  + belongs.py
353
                  + changes.py
354
                  + check.py
355
                  + depends.py
356
                  + depgraph.py
357
                  + files.py
279
[...]
358
[...]
280
</pre>
359
</pre>
281
360
282
<p>
283
The command <c>files</c> of <c>equery</c> provide some options to modify
284
the output. You can look them all up in the <c>equery</c> man page.
285
</p>
286
287
</body>
361
</body>
288
</section>
362
</section>
289
<section>
363
<section>
290
<title>Looking for packages that use a specific USE flag</title>
364
<title>Looking for Packages that Have a Specific USE Flag with hasuse (h)</title>
291
<body>
365
<body>
292
366
293
<p>
367
<p>
294
If you want to find which packages on your system that make use of a specific
368
You can use <c>hasuse</c> to find out which packages have a given USE flag.
295
USE flag, <c>equery</c> has the function <c>hasuse</c>:
369
<c>hasuse</c> won't tell you if the flag is enabled, only if the ebuild lists
370
it as an option. See the EXAMPLES section of <c>hasuse</c> in the 
371
<c>equery</c> man page for more tip on getting that information.
296
</p>
372
</p>
297
373
298
<pre caption="Searching packages which use the firefox USE flag">
374
<pre caption="Searching For Installed Packages that Use the qt3 or qt4 USE Flags">
299
# <i>equery hasuse firefox</i>
375
$ <i>equery hasuse qt3 qt4</i>
300
[ Searching for USE flag firefox in all categories among: ]
376
 * Searching for USE flag qt3 ... 
301
 * installed packages
377
[IP-] [  ] app-crypt/pinentry-0.7.5 (0)
302
[I--] [  ] dev-python/gnome-python-extras-2.14.0-r1 (0)
378
[IP-] [  ] net-dns/avahi-0.6.24-r2 (0)
303
[I--] [  ] media-video/totem-2.16.4 (0)
379
[IP-] [  ] net-wireless/wpa_supplicant-0.6.9 (0)
380
381
 * Searching for USE flag qt4 ... 
382
[IP-] [  ] net-dns/avahi-0.6.24-r2 (0)
383
[IP-] [  ] net-wireless/wpa_supplicant-0.6.9 (0)
304
</pre>
384
</pre>
305
385
306
</body>
386
</body>
307
</section>
387
</section>
308
<section>
388
<section>
309
<title>Listing Packages</title>
389
<title>Listing Packages with list (l)</title>
310
<body>
390
<body>
311
391
312
<p>
392
<p>
313
<c>equery</c> has a power feature to list packages belonging to our system,
393
<c>list</c> is a simple but powerful module to list packages that are installed,
314
portage or even an overlay. Let's try this:
394
in the Portage tree or in an overlay.
315
</p>
395
</p>
316
396
317
<pre caption="Listing packages with equery">
397
<pre caption="Listing Installed Packages with list">
318
# <i>equery list gentoolkit</i>
398
$ <i>equery list '*'</i>
319
[ Searching for package 'gentoolkit' in all categories among: ]
399
 * Searching for * ...
320
 * installed packages
400
[IP-] [  ] app-admin/eselect-1.2.3 (0)
321
[I--] [  ] app-portage/gentoolkit-0.2.0 (0)
401
[IP-] [  ] app-admin/eselect-ctags-1.10 (0)
402
[IP-] [  ] app-admin/eselect-esd-20060719 (0)
403
[IP-] [  ] app-admin/eselect-fontconfig-1.0 (0)
404
[IP-] [  ] app-admin/eselect-opengl-1.0.8-r1 (0)
405
[IP-] [  ] app-admin/eselect-python-20090824 (0)
406
[IP-] [  ] app-admin/eselect-ruby-20081227 (0)
407
[IP-] [  ] app-admin/eselect-vi-1.1.5 (0)
408
[IP-] [  ] app-admin/perl-cleaner-1.05 (0)
409
[IP-] [  ] app-admin/pessulus-2.24.0 (0)
410
[IP-] [  ] app-admin/python-updater-0.7 (0)
411
[IP-] [  ] app-admin/sudo-1.7.2_p1 (0)
412
[...]
322
</pre>
413
</pre>
323
414
324
<p>
415
<p>
325
The standard query will search our installed packages for the name given.
416
The standard query will search installed packages for the given package name.
326
If found, the following info will be displayed: the package location between
417
Passing in '*' displays all packages in the set. In the left-most field, we 
327
the first square brackets (I for Installed packages, P for Portage, O for
418
see that all the above packages are <c>I</c>nstalled and from the <c>P</c>ortage
328
Overlay), the possible masks between the second (~ by keyword, -  by arch or
419
tree. They're not masked (the second field is blank), and they're all installed
329
M hard masked), then the category and complete name and last of all, the slot
420
in the default slot (0).
330
in which the package is stored.
421
</p>
422
423
<p>
424
This time we are going to use local options to look for packages in the
425
 Portage tree and overlays.
426
</p>
427
428
<pre caption="Using Local Options with list">
429
$ <i>equery list -po vim</i>
430
 * Searching for vim ...
431
[-P-] [  ] app-editors/vim-7.0.235 (0)
432
[-P-] [ ~] app-editors/vim-7.0.243 (0)
433
[-P-] [  ] app-editors/vim-7.1.123 (0)
434
[-P-] [ ~] app-editors/vim-7.1.330 (0)
435
[-P-] [  ] app-editors/vim-7.2 (0)
436
[-P-] [ ~] app-editors/vim-7.2.108 (0)
437
[IP-] [  ] app-editors/vim-7.2.182 (0)
438
[-P-] [ ~] app-editors/vim-7.2.238 (0)
439
[-P-] [ ~] app-editors/vim-7.2.264 (0)
440
</pre>
441
442
<p>
443
In this example you can see version 7.2.182 is installed and there are no
444
 versions available from an overlay. You can see which versions are keyword 
445
masked by the <c>~</c> in the second field.
446
</p>
447
448
</body>
449
</section>
450
<section>
451
<title>Viewing Package Metadata with meta (m)</title>
452
<body>
453
454
<p>
455
Each package in the Portage tree provides at least some metadata about
456
its maintainer, herd, etc. Read about <uri link="http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&amp;chap=4">Gentoo Metadata</uri>. 
457
The amount of useful information depends on how much package maintainers
458
decide to provide. With no options, <c>meta</c> returns some basic useful
459
information.
331
</p>
460
</p>
332
461
462
<pre caption="Getting Package Metadata with meta">
463
$ <i>equery meta gnucash</i>
464
 * app-office/gnucash [gentoo]
465
 Herd:        gnome-office (gnome-office@gentoo.org)
466
 Maintainer:  tove@gentoo.org (Torsten Veller)
467
 Upstream:    None specified
468
 Location:    /usr/portage/app-office/gnucash
469
 Keywords:    2.2.9-r1:0: alpha amd64 ppc sparc x86
470
 Keywords:    2.2.9-r2:0: 
471
 Keywords:    2.3.8:0: 
472
 Keywords:    2.3.10:0: ~alpha ~amd64 ~ppc ~sparc ~x86
473
</pre>
474
333
<p>
475
<p>
334
Another example, this time we are going to use the local options in order
476
When the maintainer provides extra information, it can be very useful:
335
to look for packages in our portage tree and overlay.
336
</p>
477
</p>
337
478
338
<pre caption="Using local options with equery">
479
<pre caption="Getting Long Package Descriptions with meta">
339
# <i>equery list -p -o vim</i>
480
$ <i>equery meta --description emacs</i>
340
[ Searching for package 'vim' in all categories among: ]
481
 * app-editors/emacs
341
 * installed packages
482
  GNU Emacs is an extensible, customizable text editor - and more. At its core
342
[I--] [  ] app-editors/vim-6.3-r4 (0)
483
  is an interpreter for Emacs Lisp, a dialect of the Lisp programming language
343
 * Portage tree (/usr/portage)
484
  with extensions to support text editing. The features of GNU Emacs include:
344
[-P-] [M~] app-editors/vim-7.0_alpha20050126 (0)
485
   * Content-sensitive editing modes, including syntax coloring, for a wide
345
[-P-] [M~] app-editors/vim-7.0_alpha20050201 (0)
486
     variety of file types including plain text, source code, and HTML.
346
[-P-] [  ] app-editors/vim-6.3-r2 (0)
487
   * Complete built-in documentation, including a tutorial for new users.
347
[-P-] [M~] app-editors/vim-7.0_alpha20050122 (0)
488
   * Support for many languages and their scripts, including all the European
348
[-P-] [M~] app-editors/vim-core-7.0_alpha20050126 (0)
489
     "Latin" scripts, Russian, Greek, Japanese, Chinese, Korean, Thai,
349
[-P-] [  ] app-editors/vim-core-6.3-r3 (0)
490
     Vietnamese, Lao, Ethiopian, and some Indian scripts.
350
[-P-] [M~] app-editors/vim-core-7.0_alpha20050122 (0)
491
   * Highly customizable, using Emacs Lisp code or a graphical customization
351
[-P-] [M~] app-editors/vim-core-7.0_alpha20050201 (0)
492
     interface.
352
[-P-] [  ] app-editors/vim-core-6.3-r4 (0)
493
   * A large number of extensions that add other functionality, including a
353
 * overlay tree (/opt/ebuilds)
494
     project planner, mail and news reader, debugger interface, calendar, and
495
     more. Many of these extensions are distributed with GNU Emacs; others are
496
     available separately.
354
</pre>
497
</pre>
355
498
356
</body>
499
</body>
357
</section>
500
</section>
358
<section>
501
<section>
359
<title>Finding Package Sizes</title>
502
<title>Finding Package Sizes with size (s)</title>
360
<body>
503
<body>
361
504
362
<p>
505
<p>
Lines 366-417 Link Here
366
<c>equery</c> to the rescue!
509
<c>equery</c> to the rescue!
367
</p>
510
</p>
368
511
369
<pre caption="Package Size">
512
<pre caption="Displaying Package Size">
370
# <i>equery size openoffice-bin</i>
513
$ <i>equery size openoffice-bin</i>
371
* app-office/openoffice-bin-1.1.2
514
 * app-office/openoffice-bin-3.1.1
372
     Total Files : 2908
515
         Total files : 4624
373
     Total Size  : 223353.31 KiB
516
         Total size  : 361.38 MiB
374
</pre>
517
</pre>
375
518
376
<p>
519
<p>
377
As you can see, <c>equery</c> prints the total space used in kilobytes and
520
As you can see, <c>size</c> prints the total space used in human-readable
378
also lists the total number of files the package has.
521
units and also lists the total number of files the package has. To get the
522
total size in bytes, use <c>--bytes</c>.
379
</p>
523
</p>
380
524
381
</body>
525
</body>
382
</section>
526
</section>
383
<section>
527
<section>
384
<title>Package-wise list of USE Flags</title>
528
<title>Listing Per-Package USE Flags with uses (u)</title>
385
<body>
529
<body>
386
530
387
<p>
531
<p>
388
<c>equery</c> can be used to give us information about what USE flags
532
<c>equery</c>'s <c>uses</c> module can provide information about what USE
389
are being used by a specific package. It also tells us what our current USE
533
flags are available for a specific package, and which of those flags is
390
flags are for a package and also what USE flags are available for the package.
534
currently enabled.
391
</p>
535
</p>
392
536
393
<pre caption="Set and Unset USE Flags">
537
<pre caption="Showing Set and Unset USE Flags">
394
# <i>equery uses wireshark</i>
538
$ <i>equery uses gst-plugins-meta</i>
395
[ Colour Code : set unset ]
539
 * Searching for gst-plugins-meta ...
396
[ Legend    : (U) Col 1 - Current USE flags        ]
540
[ Legend : U - flag is set in make.conf       ]
397
[           : (I) Col 2 - Installed With USE flags ]
541
[        : I - package is installed with flag ]
398
542
[ Colors : set, unset                         ]
399
 U I [ Found these USE variables in : net-analyzer/wireshark-0.99.4 ]
543
 * Found these USE flags for media-plugins/gst-plugins-meta-0.10-r2:
400
 - - adns      : Adds support for the adns DNS client library
544
 U I
401
 + + gtk       : Adds support for x11-libs/gtk+ (The GIMP Toolkit)
545
 + + X      : Adds support for X11
402
 - - ipv6      : Adds support for IP version 6
546
 - - a52    : Enables support for decoding ATSC A/52 streams used in DVD
403
 - - kerberos  : Adds kerberos support
547
 + + alsa   : Adds support for media-libs/alsa-lib (Advanced Linux Sound
404
 - - portaudio : Adds support for the crossplatform portaudio audio API
548
              Architecture)
405
 - - selinux   : !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
549
 - - dvb    : Adds support for DVB (Digital Video Broadcasting)
406
 - - snmp      : Adds support for the Simple Network Management Protocol if available
550
 + + dvd    : Adds support for DVDs
407
 + + ssl       : Adds support for Secure Socket Layer connections
551
 + + esd    : Adds support for media-sound/esound (Enlightened Sound Daemon)
408
 - - threads   : Adds threads support for various packages. Usually pthreads
552
 + + ffmpeg : Enable ffmpeg-based audio/video codec support
553
 + + flac   : Adds support for FLAC: Free Lossless Audio Codec
554
 - - mad    : Adds support for mad (high-quality mp3 decoder library and cli
555
              frontend)
556
 + + mpeg   : Adds libmpeg3 support to various packages
557
 - - mythtv : Support for retrieval from media-tv/mythtv backend
558
 + + ogg    : Adds support for the Ogg container format (commonly used by
559
              Vorbis, Theora and flac)
560
 - - oss    : Adds support for OSS (Open Sound System)
561
 + + theora : Adds support for the Theora Video Compression Codec
562
 + + vorbis : Adds support for the OggVorbis audio codec
563
 - - xv     : Adds in optional support for the Xvideo extension (an X API for
564
              video playback)
409
</pre>
565
</pre>
410
566
411
<p>
567
<p>
412
I have installed wireshark with only the gtk and ssl flags set, but there are
568
Here, a number of USE flags are enabled in <c>gstreamer</c>'s plugin
413
several other USE flags for wireshark still available. For more information on
569
 meta-package, but you can see that there are other USE flags available.
414
USE flags, please refer to the <uri
570
 For more information on USE flags, please refer to the <uri
415
link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">USE Flags</uri>
571
link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">USE Flags</uri>
416
chapter of the <uri link="/doc/en/handbook/">Gentoo Handbook</uri>.
572
chapter of the <uri link="/doc/en/handbook/">Gentoo Handbook</uri>.
417
</p>
573
</p>
Lines 419-438 Link Here
419
</body>
575
</body>
420
</section>
576
</section>
421
<section>
577
<section>
422
<title>Where's the ebuild?</title>
578
<title>Finding the Ebuild Path with which (w)</title>
423
<body>
579
<body>
424
580
425
<p>
581
<p>
426
We can also find out which ebuild is being used for a specific package using
582
<c>which</c> is a simple script to help you quickly find the file path to an
427
<c>equery</c>. This is done by using the <c>equery which</c> command which
583
 ebuild. If you pass an unversioned package name, <c>which</c> will return the
428
displays the full path to the ebuild.
584
path to the newest installable ebuild version, in other words, the ebuild
585
Portage would use if you typed <c>emerge package</c>. Pass in a versioned
586
 package to get the path to that ebuild.
429
</p>
587
</p>
430
588
431
<pre caption="Displaying the ebuild path">
589
<pre caption="Displaying the Latest Installable Ebuild Path">
432
# <i>equery which cdrtools</i>
590
$ <i>equery which gnome</i>
433
/usr/portage/app-cdr/cdrtools/cdrtools-2.01_alpha37.ebuild
591
/usr/portage/gnome-base/gnome/gnome-2.26.3.ebuild
434
</pre>
592
</pre>
435
593
594
<p>
595
Lastly, if none of the above features of <c>equery</c> have answered your 
596
question, try using <c>which</c> to manually search an ebuild with programs
597
 like <c>cat</c>, <c>less</c> or <c>grep</c>:
598
</p>
599
600
<pre caption="Other Useful Ways to Use which">
601
$ <i>grep HOMEPAGE $(equery which gentoolkit)</i>
602
HOMEPAGE="http://www.gentoo.org/proj/en/portage/tools/index.xml"
603
</pre>
604
605
<warn>
606
Be aware that equery currently changes the format of the output if it is sent
607
through a pipe. The piped format is intended to be easier to parse by tools, but
608
you can also turn it off by adding the <c>--no-pipe</c> option. If you write
609
scripts that employ equery, you should be aware of this.
610
</warn>
611
436
</body>
612
</body>
437
</section>
613
</section>
438
</chapter>
614
</chapter>
Lines 653-713 Link Here
653
<pre caption="Running revdep-rebuild in pretend mode">
829
<pre caption="Running revdep-rebuild in pretend mode">
654
# <i>revdep-rebuild -p</i>
830
# <i>revdep-rebuild -p</i>
655
831
656
Checking reverse dependencies...
832
 * Configuring search environment for revdep-rebuild
657
Packages containing binaries and libraries broken by any package update,
658
will be recompiled.
659
660
Collecting system binaries and libraries... done.
661
  (/root/.revdep-rebuild.1_files)
662
663
Collecting complete LD_LIBRARY_PATH... done.
664
  (/root/.revdep-rebuild.2_ldpath)
665
666
Checking dynamic linking consistency...
667
  broken /usr/lib/ao/plugins-2/libarts.so (requires libartsc.so.0)
668
  broken /usr/lib/kde3/libkpresenterpart.so (requires libartskde.so.1 libqtmcop.so.1
669
         libsoundserver_idl.so.1 libkmedia2_idl.so.1 libartsflow.so.1 libartsflow_idl.so.1 libmcop.so.1)
670
  broken /usr/lib/ruby/site_ruby/1.8/i686-linux/fox.so (requires libFOX-1.0.so.0)
671
  broken /usr/lib/xine/plugins/1.0.0/xineplug_ao_out_arts.so (requires libartsc.so.0)
672
  broken /usr/lib/perl5/vendor_perl/5.8.0/i686-linux/auto/SDL_perl/SDL_perl.so (requires libSDL_gfx.so.0)
673
  broken /usr/lib/libloudmouth-1.so.0.0.0 (requires libgnutls.so.10)
674
  broken /usr/bin/k3b (requires libartskde.so.1 libqtmcop.so.1 libsoundserver_idl.so.1 libkmedia2_idl.so.1
675
         libartsflow.so.1 libartsflow_idl.so.1 libmcop.so.1)
676
  broken /usr/bin/lua (requires libhistory.so.4)
677
  broken /usr/bin/lyx (requires libAiksaurus-1.0.so.0)
678
  broken /usr/bin/luac (requires libhistory.so.4)
679
  broken /usr/bin/avidemux2 (requires libartsc.so.0)
680
  broken /usr/bin/pptout (requires libxml++-0.1.so.11)
681
  broken /usr/bin/xml2ps (requires libxml++-0.1.so.11)
682
 done.
683
  (/root/.revdep-rebuild.3_rebuild)
684
685
Assigning files to ebuilds... done.
686
  (/root/.revdep-rebuild.4_ebuilds)
687
688
Evaluating package order... done.
689
  (/root/.revdep-rebuild.5_order)
690
691
All prepared. Starting rebuild...
692
emerge --oneshot --nodeps -p =app-cdr/k3b-0.11.14 =app-office/koffice-1.3.2 =app-office/lyx-1.3.4 \
693
       =app-office/passepartout-0.2 =dev-lang/lua-5.0.2 =dev-ruby/fxruby-1.0.29 =media-libs/libao-0.8.5 \
694
       =media-libs/xine-lib-1_rc5-r3 =media-video/avidemux-2.0.26 =net-libs/loudmouth-0.16
695
696
These are the packages that I would merge, in order:
697
698
Calculating dependencies ...done!
699
[ebuild   R   ] app-cdr/k3b-0.11.14
700
[ebuild   R   ] app-office/koffice-1.3.2
701
[ebuild   R   ] app-office/lyx-1.3.4
702
[ebuild   R   ] app-office/passepartout-0.2
703
[ebuild   R   ] dev-lang/lua-5.0.2
704
[ebuild   R   ] dev-ruby/fxruby-1.0.29
705
[ebuild   R   ] media-libs/libao-0.8.5
706
[ebuild   R   ] media-libs/xine-lib-1_rc5-r3
707
[ebuild   R   ] media-video/avidemux-2.0.26
708
[ebuild   R   ] net-libs/loudmouth-0.16
709
833
710
Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.
834
 * Checking reverse dependencies
835
 * Packages containing binaries and libraries broken by a package update
836
 * will be emerged.
837
838
 * Collecting system binaries and libraries
839
 * Generated new 1_files.rr
840
 * Collecting complete LD_LIBRARY_PATH
841
 * Generated new 2_ldpath.rr
842
 * Checking dynamic linking consistency
843
[ 48% ]  *   broken /usr/lib/gstreamer-0.10/libgsttaglib.la (requires /usr/lib/libtag.la)
844
[ 64% ]  *   broken /usr/lib/libgdkglext-x11-1.0.la (requires /usr/lib/libGLU.la)
845
[ 67% ]  *   broken /usr/lib/libgtkglext-x11-1.0.la (requires /usr/lib/libGLU.la)
846
[ 85% ]  *   broken /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gdkgl/_gdkgl.la (requires /usr/lib/libGLU.la)
847
 *   broken /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gtkgl/_gtkgl.la (requires /usr/lib/libGLU.la)
848
[ 97% ]  *   broken /usr/qt/3/lib/libqt-mt.la (requires -lpng)
849
[ 100% ]
850
 * Generated new 3_broken.rr
851
 * Assigning files to packages
852
 *   /usr/lib/gstreamer-0.10/libgsttaglib.la -> media-plugins/gst-plugins-taglib
853
 *   /usr/lib/libgdkglext-x11-1.0.la -> x11-libs/gtkglext
854
 *   /usr/lib/libgtkglext-x11-1.0.la -> x11-libs/gtkglext
855
 *   /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gdkgl/_gdkgl.la -> dev-python/pygtkglext
856
 *   /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gtkgl/_gtkgl.la -> dev-python/pygtkglext
857
 *   /usr/qt/3/lib/libqt-mt.la -> x11-libs/qt
858
 * Generated new 4_raw.rr and 4_owners.rr
859
 * Cleaning list of packages to rebuild
860
 * Generated new 4_pkgs.rr
861
 * Assigning packages to ebuilds
862
 * Generated new 4_ebuilds.rr
863
 * Evaluating package order
864
 * Generated new 5_order.rr
865
 * All prepared. Starting rebuild
866
emerge --oneshot --pretend  dev-python/pygtkglext:0
867
media-plugins/gst-plugins-taglib:0.10
868
x11-libs/gtkglext:0
869
x11-libs/qt:3
870
871
These are the packages that would be merged, in order:
872
873
Calculating dependencies... done!
874
[ebuild   R   ] media-plugins/gst-plugins-taglib-0.10.17
875
[ebuild   R   ] x11-libs/gtkglext-1.2.0
876
[ebuild   R   ] x11-libs/qt-3.3.8b-r2
877
[ebuild   R   ] dev-python/pygtkglext-1.1.0
878
 * Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.
711
</pre>
879
</pre>
712
880
713
<p>
881
<p>
Lines 722-728 Link Here
722
<body>
890
<body>
723
891
724
<p>
892
<p>
725
<c>glsa-check</c> is mainly a test tool that keeps track of the various GLSAs
893
<c>glsa-check</c> is mainly a test tool that keeps track of the various GLSA's
726
(Gentoo Linux Security Advisory) and will eventually be integrated into
894
(Gentoo Linux Security Advisory) and will eventually be integrated into
727
<c>emerge</c> and <c>equery</c>.
895
<c>emerge</c> and <c>equery</c>.
728
</p>
896
</p>

Return to bug 269071