/[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.8 Revision 1.37
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.8 2004/03/06 17:06:19 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoolkit.xml,v 1.37 2012/07/24 12:12:51 swift Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link = "/doc/en/gentoolkit.xml"> 5<guide>
6<title>Gentoolkit</title> 6<title>Gentoolkit</title>
7<author title="Author"><mail link="mbutcher@aleph-null.tv"> 7
8Matt Butcher</mail> 8<author title="Author">
9 <mail link="mbutcher@aleph-null.tv">Matt Butcher</mail>
9</author> 10</author>
10 11<author title="Editor">
11<author title="Editor"><!-- zhen@gentoo.org --> 12 <!-- zhen@gentoo.org -->John P. Davis
12 John P. Davis
13</author> 13</author>
14<author title="Editor"> 14<author title="Editor">
15 <mail link="erwin@gentoo.org">Erwin</mail> 15 <mail link="erwin@gentoo.org">Erwin</mail>
16</author> 16</author>
17<author title="Editor">
18 <mail link="fox2mike@gentoo.org">Shyam Mani</mail>
19</author>
20<author title="Editor">
21 <mail link="neysx@gentoo.org">Xavier Neys</mail>
22</author>
23<author title="Editor">
24 <mail link="karltk@gentoo.org">Karl Trygve</mail>
25</author>
26<author title="Editor">
27 <mail link="yoswink@gentoo.org">José Luis Rivero</mail>
28</author>
29<author title="Editor">
30 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail>
31</author>
32<author title="Editor">
33 <mail link="douglasjanderson@gmail.com">Douglas Anderson</mail>
34</author>
35
36<abstract>
37Gentoolkit is a suite of tools to ease the administration of a Gentoo system.
38This document covers the basics of some of the tools present in Gentoolkit.
39</abstract>
40
17<!-- Licensed under GFDL --> 41<!-- Licensed under GFDL -->
18 42
19<abstract>
20 Gentoolkit is a suite of tools to ease the administration of a Gentoo system.
21 This document covers the basics of
22 some of the tools present in Gentoolkit.
23</abstract>
24
25<version>1.2</version> 43<version>5</version>
26<date>December 1, 2003</date> 44<date>2012-07-24</date>
27 45
28<chapter> 46<chapter>
29 <title>Introduction</title> 47<title>Introduction</title>
30 <section> 48<section>
31 <title>What is Gentoolkit?</title> 49<title>What is Gentoolkit?</title>
32 <body> 50<body>
51
52<p>
33 <p>Gentoo is a unique distribution, and presents some complexities that 53Gentoo is a unique distribution and presents some complexities that simply
34 simply don't exist for other distributions. As Gentoo developers 54don't exist for other distributions. As Gentoo developers and contributors
35 and contributors discovered some of these complexities, they also 55discovered some of these complexities, they also wrote tools to help users and
36 wrote tools to help users and administrators work around them. 56administrators work around them. Many of these tools have been contributed to
37 Many of these tools have been contributed to the Gentoo project, 57the Gentoo project and are included in the package
38 and are included in the package <path>app-portage/gentoolkit</path>. 58<c>app-portage/gentoolkit</c>.
39 </p> 59</p>
40 60
61<note>
62As of now, there are two versions of gentoolkit: <c>app-portage/gentoolkit</c>
63and <c>app-portage/gentoolkit-dev</c>. While the former contains administration
64scripts, the latter contains scripts specific to help development on Gentoo.
65If you are a developer, you can have your scripts included into
66<c>gentoolkit-dev</c> by contacting the Gentoolkit maintainer. This document
67discusses gentoolkit only.
68</note>
69
70<p>
41 <p>Gentoolkit contains a whole bunch of useful tools to help manage 71Gentoolkit contains a whole bunch of useful tools to help manage your packages
42 Portage and the ebuild architecture. Most users -- particularly 72and keep track of what is going on in your system. Most users
43 those who update systems often -- will benefit from having 73--&nbsp;particularly those who update systems often&nbsp;-- will benefit from
44 gentoolkit installed.</p> 74having gentoolkit installed.
75</p>
76
45 </body> 77</body>
46 </section> 78</section>
47 <section> 79<section>
48 <title>Installation</title> 80<title>Installation</title>
49 <body> 81<body>
82
83<p>
50 <p>Just as with any Gentoo package, installation is just a simple 84Just as with any Gentoo package, installation is just a simple emerge.
51 emerge. 85</p>
52 </p>
53 86
54 <pre> 87<pre caption="Getting gentoolkit">
55<i>emerge gentoolkit </i> 88# <i>emerge gentoolkit</i>
56 </pre> 89</pre>
90
91<note>
57 <note>Many of the tools in gentoolkit reveal important information 92Many of the tools in gentoolkit reveal important information about your system
58 about your system or require root permissions. For that reason, 93or require root privilege. For that reason, some of the programs may only be
59 some of the programs may only be executed (or only function 94executed (or only function properly) if run by a user with root privileges.
60 properly) if run by a user with root permissions.</note> 95</note>
96
61 </body> 97</body>
62 </section> 98</section>
63 <section> 99<section>
64 <title>Finding Documentation</title> 100<title>Finding Documentation</title>
65 <body> 101<body>
66 102
67 <p> 103<p>
68 At the time of this writing, not all of the programs in gentoolkit
69 are well documented. Some have man pages, but not all. Any documentation
70 that a program might have (other than man pages) is stored in 104Any documentation that a program might have (other than man pages) is stored in
71 <path>/usr/doc/gentoolkit-[version]/[program-name]/</path>. 105<path>/usr/share/doc/gentoolkit-[version]/[program-name]/</path>.
72 </p> 106</p>
107
73 </body> 108</body>
74 </section> 109</section>
75</chapter> 110</chapter>
111
76<chapter> 112<chapter>
77 <title>Querying Package Data with qpkg</title> 113<title>equery</title>
78 <section> 114<section>
79
80 <title>Introduction</title> 115<title>Introduction</title>
81 <body> 116<body>
82 <p><c>qpkg</c> is flexible tool for determining information about ebuilds,
83 whether installed or not. It can provide information about what files belong
84 to which ebuilds, whether multiple versions of the same package are installed,
85 and what a particular ebuild does.
86 </p>
87 <p>Calling <c>qpkg</c> with no arguments prints a list of all ebuilds, with asterisks
88 (*) next to the packages that are installed on the system.
89 </p>
90 <note>By default, <c>qpkg</c> prints output in color. To turn this off on the command
91 line, use the <c>--no-color</c> or <c>-nc</c> flag.</note>
92 117
118<p>
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.
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
123and lists all available modules and their shorthand names.
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
126available modules and options, and provides useful examples.
127</p>
128
129<p>
130Below is a list of features that work over the majority of modules.
131</p>
132
133<pre caption="Examples of Acceptable Input">
134<comment>(Many modules require a package argument. equery accepts all emerge-like input):</comment>
135$ <i>equery --quiet list gcc</i> # <comment>package</comment>
136sys-devel/gcc-4.3.2-r3
137$ <i>equery --quiet list sys-devel/gcc</i> # <comment>category/package</comment>
138sys-devel/gcc-4.3.2-r3
139$ <i>equery --quiet list '>=sys-devel/gcc-4'</i> # <comment>atom syntax</comment>
140sys-devel/gcc-4.3.2-r3
141
142<comment>(Like emerge, equery doesn't understand partial package names):</comment>
143$ <i>equery check zilla</i>
144!!! No package found matching zilla
145
146<comment>(Unlike emerge, equery 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 equery 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>
168dev-dotnet/flickrnet-bin-2.2
169dev-ruby/flickr-1.0.2-r1
170dev-ruby/flickr-1.0.2-r2
171dev-ruby/rflickr-20060201
172media-gfx/kflickr-0.6
173[...]
174</pre>
175
176<note>
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>.
179To act on all packages in a category, use <c>'category-name/*'</c>.
180</note>
181
182<warn>
183Don't forget to quote input when using special shell characters
184like asterisks or greater than/less than signs.
185</warn>
186
187<p>
188The next few sections in this document give a quick introduction to the
189different <c>equery</c> modules.
190</p>
191
93 </body> 192</body>
94 </section> 193</section>
95 <section> 194<section>
96 <title>Querying Package Information</title> 195<title>Finding the Package That a File Came From with belongs (b)</title>
97 <body> 196<body>
98 <p>One of the most common uses for <c>qpkg</c> is determining what a given package
99 is. For instance, while looking through <path>net-misc</path>, I saw a package
100 called <path>neon</path>. Having no idea what it was, I ran qpkg.
101 </p>
102 197
103 <pre> 198<pre caption="Finding the Package that Installed a Given File">
104hebron root # <i>qpkg -i net-misc/neon 199$ <i>equery belongs -e /usr/bin/glxgears</i>
105net-misc/neon-0.15.3-r1 200 * Searching for /usr/bin/glxgears ...
106 HTTP and WebDAV client library [ http://www.webdav.org/neon ] 201 x11-apps/mesa-progs-7.5.1 (/usr/bin/glxgears)
107net-misc/neon-0.18.5
108 HTTP and WebDAV client library [ http://www.webdav.org/neon ]
109net-misc/neon-0.19.2
110 HTTP and WebDAV client library [ http://www.webdav.org/neon ]
111net-misc/neon-0.19.2-r1
112 HTTP and WebDAV client library [ http://www.webdav.org/neon ]
113net-misc/neon-0.21.1
114 HTTP and WebDAV client library [ http://www.webdav.org/neon ] </i>
115 </pre> 202</pre>
116 <p> 203
117 <c>qpkg</c> read through the ebuild files for the five <path>net-misc/neon</path> 204<p>
118 ebuilds and printed out the information stored in DESCRIPTION and HOMEPAGE. 205<c>belongs</c> can search for files matching a regular expression with the
119 </p> 206<c>-f</c> option. The <c>-e</c> option stops searching after it finds a match.
207Since no file on your system should be owned by two packages, this is a safe
208optimization.
209</p>
210
120 </body> 211</body>
121
122 </section> 212</section>
123 <section> 213<section>
124 <title>Listing Files Belonging to an Ebuild</title> 214<title>Viewing ChangeLog Entries with changes (c)</title>
125 <body> 215<body>
126 <p>
127 <c>qpkg</c> can also list the files that belong to an installed ebuild. I
128 Know that gentoolkit installed several tools, but I don't know what they
129 all are. To find out, I can do a <c>qpkg -l</c>
130 216
131 </p> 217<p>
132 <pre> 218<c>changes</c> lets you view ChangeLog entries for a package version or range
133hebron portage # <i>qpkg -l app-portage/gentoolkit 219of versions. Imagine after an <c>emerge --sync</c>, you
134app-portage/gentoolkit-0.1.14-r1 * 220notice Portage is going to be upgraded and want to check what has changed:
135CONTENTS: 221</p>
136/usr 222
137/usr/share 223<pre caption="Viewing Gentoo ChangeLog Entries">
138/usr/share/gentoolkit 224<comment>(Show the latest installable version's entry):</comment>
139/usr/share/gentoolkit/histogram.awk 225$ <i>equery changes portage</i>
140/usr/share/doc 226*portage-2.1.6.13 (03 May 2009)
141/usr/share/doc/gentoolkit-0.1.14-r1 227
142/usr/share/doc/gentoolkit-0.1.14-r1/gentool 228 03 May 2009; Zac Medico &lt;zmedico@gentoo.org&gt; +portage-2.1.6.13.ebuild:
143/usr/share/doc/gentoolkit-0.1.14-r1/gentool/ChangeLog.gz 229 2.1.6.13 bump. This fixes bug #268398 (document econf automatic die)
144/usr/share/doc/gentoolkit-0.1.14-r1/lintool 230 and bug #267104 (handle insufficient space interaction with userfetch).
145/usr/share/doc/gentoolkit-0.1.14-r1/lintool/checklist-for-ebuilds.gz 231 Bug #268228 tracks all bugs fixed since 2.1.6.11.
146/usr/share/doc/gentoolkit-0.1.14-r1/lintool/ChangeLog.gz
147/usr/share/doc/gentoolkit-0.1.14-r1/etc-update
148/usr/share/doc/gentoolkit-0.1.14-r1/etc-update/ChangeLog.gz
149/usr/share/man
150/usr/share/man/man1
151/usr/share/man/man1/qpkg.1.gz
152/usr/share/man/man1/lintool.1.gz
153/usr/share/man/man1/etc-update.1.gz
154/usr/bin
155/usr/bin/gentool-bump-revision
156/usr/bin/gentool-total-coverage
157/usr/bin/gentool-author-coverage
158/usr/bin/gentool-package-count
159/usr/bin/qpkg
160/usr/bin/pkg-size
161/usr/bin/lintool
162/usr/sbin
163/usr/sbin/pkg-clean
164/usr/sbin/mkebuild
165/usr/sbin/emerge-webrsync
166/usr/sbin/epm
167/usr/sbin/etc-update
168/etc
169/etc/etc-update.conf </i>
170 </pre> 232</pre>
233
171 </body> 234</body>
172 </section> 235</section>
173 <section> 236<section>
174 <title>Finding the Package from Where a File Came</title> 237<title>Verifying Package Integrity with check (k)</title>
175 <body> 238<body>
176 239
177 <p> 240<p>
178 To find the package that a file came from, use the <c>-f</c> 241Sometimes it is useful to check a package's integrity. <c>equery</c> can
179 or <c>--find-file</c> flag. 242verify MD5 sums as well as timestamps to indicate when a package might
180 </p> 243have been corrupted, replaced, or removed.
181 <pre> 244</p>
182 hebron portage # <i>qpkg -f net-www/mozilla * </i> 245
246<pre caption="Checking Package Integrity">
247$ <i>equery check gentoolkit</i>
248 * Checking app-portage/gentoolkit-0.3.0_rc7 ...
249 71 out of 71 files passed
183 </pre> 250</pre>
184 251
185 </body> 252</body>
186 </section> 253</section>
187 <section> 254<section>
188 <title>Listing Duplicate Packages</title> 255<title>Listing All Packages Depending on Package X with depends (d)</title>
189 <body> 256<body>
190 <p>
191 Sometimes multiple versions of the same package may exist. <c>qpkg --dup</c>
192 257
193 will print a list of duplicate packages. The existence of a duplicate package 258<p>
194 though may not indicate that the older version may be removed. They may fill 259Ever wonder why a certain package has been installed on your system?
195 different slots. To look for duplicates in the same slot, use 260<c>equery</c> can tell which packages list it as a dependency with
196 <c>qpkg --dups --slot</c>. I just updated KDE from 3.0 to 3.0.2, so I have some 261<c>depends</c>. Include indirect dependencies with the <c>-D</c>
197 duplicates in the same slot. 262option.
198 </p> 263</p>
199 <pre> 264
200hebron portage # <i>qpkg --dups --slot 265<pre caption="Looking for Packages Depending on pygtk">
201app-portage/gentoolkit 266$ <i>equery depends pygtk</i>
202kde-base/kdeaddons 267 * Searching for pygtk ...
203kde-base/kdeadmin 268app-admin/pessulus-2.24.0 (>=dev-python/pygtk-2.6.0)
204kde-base/kdeartwork 269app-editors/gedit-2.24.3 (python ? >=dev-python/pygtk-2.12)
205kde-base/kdebase 270dev-libs/libgweather-2.24.3 (python ? >=dev-python/pygtk-2)
206kde-base/kdegames 271dev-python/gnome-python-base-2.22.3 (>=dev-python/pygtk-2.10.3)
207kde-base/kdelibs 272dev-python/gnome-python-desktop-base-2.24.1 (>=dev-python/pygtk-2.10.3)
208kde-base/kdemultimedia 273[...]
209kde-base/kdenetwork
210kde-base/kdetoys
211kde-base/kdeutils
212media-libs/freetype
213x11-libs/qt </i>
214 </pre> 274</pre>
275
215 </body> 276</body>
216 </section> 277</section>
217 <section> 278<section>
218 <title>Verifying Package Integrity</title> 279<title>Getting Dependency Graphs with depgraph (g)</title>
219
220 <body> 280<body>
221 <p>
222 Sometimes it is useful to check a package's integrity to know that files
223 have not been replaced since they were installed. <c>qpkg</c> can
224 verify md5 sums as well as install times to indicate whether or not files
225 for the package might have been corrupted, replaced, or removed.
226 </p>
227 <p>To check both mtimes and md5 sums, use the <c>-c</c> flag.</p>
228 <pre>
229 281
230hebron portage # <i>qpkg gnupg -c -v 282<p>
231app-crypt/gnupg-1.0.6 * 283<c>depgraph</c> is the opposite of <c>depends</c>. You pass it a package, and
232/usr/lib/gnupg/rndunix !md5! !mtime! 284it will find the packages <e>it</e> depends on (not that depend on it).
233/usr/lib/gnupg/rndegd !md5! !mtime! 285When it finds a dependency, it will recursively search for all of
234/usr/lib/gnupg/tiger !md5! !mtime! 286<e>that</e> package's dependencies. Control how deep the tree gets with
235/usr/bin/gpg !md5! !mtime! 287the <c>--depth</c> option.
236/usr/bin/gpgv !md5! !mtime! 288</p>
237/usr/share/gnupg/options.skel !md5! !mtime!
238/usr/share/gnupg/FAQ !md5! !mtime!
239/usr/share/gnupg/faq.html !md5! !mtime!
240/usr/share/locale/da/LC_MESSAGES/gnupg.mo !md5! !mtime!
241/usr/share/locale/de/LC_MESSAGES/gnupg.mo !md5! !mtime!
242/usr/share/locale/eo/LC_MESSAGES/gnupg.mo !md5! !mtime!
243/usr/share/locale/et/LC_MESSAGES/gnupg.mo !md5! !mtime!
244/usr/share/locale/fr/LC_MESSAGES/gnupg.mo !md5! !mtime!
245/usr/share/locale/id/LC_MESSAGES/gnupg.mo !md5! !mtime!
246/usr/share/locale/it/LC_MESSAGES/gnupg.mo !md5! !mtime!
247/usr/share/locale/ja/LC_MESSAGES/gnupg.mo !md5! !mtime!
248/usr/share/locale/nl/LC_MESSAGES/gnupg.mo !md5! !mtime!
249/usr/share/locale/pl/LC_MESSAGES/gnupg.mo !md5! !mtime!
250/usr/share/locale/pt_BR/LC_MESSAGES/gnupg.mo !md5! !mtime!
251/usr/share/locale/sv/LC_MESSAGES/gnupg.mo !md5! !mtime!
252/usr/share/locale/tr/LC_MESSAGES/gnupg.mo !md5! !mtime!
253/usr/share/info/gpgv.info.gz !md5! !mtime!
254/usr/share/man/man1/gpg.1.gz !md5! !mtime!
255/usr/share/man/man1/gpgv.1.gz !md5! !mtime!
25624/92
257 289
258app-crypt/gnupg-1.0.7 * 290<pre caption="Viewing Dependency Graph for mozilla-firefox">
2590/101 </i> 291$ <i>equery depgraph mozilla-firefox</i>
292 * Searching for mozilla-firefox ...
293 * dependency graph for www-client/mozilla-firefox-2.0.0.19:
294`-- www-client/mozilla-firefox-2.0.0.19
295 `-- virtual/jre-1.6.0 (virtual/jre) [java]
296 `-- virtual/jdk-1.6.0 (virtual/jdk-1.6.0*)
297 `-- dev-java/icedtea6-bin (unable to resolve: package masked or removed)
298 `-- dev-java/sun-jdk-1.6.0.15
299 `-- dev-java/java-sdk-docs-1.6.0.10 [doc]
300 `-- app-arch/unzip-6.0-r1
301 `-- app-arch/bzip2-1.0.5-r1 [bzip2]
302 `-- sys-libs/glibc-2.9_p20081201-r2
303 `-- sys-devel/gettext-0.17 [nls]
304 `-- virtual/libiconv-0 (virtual/libiconv)
305[...]
260 </pre> 306</pre>
261 <p>
262 As you can see, I have more than one version of GnuPG installed. <c>qpkg</c>
263 reports that many of the files from the older version have been changed since I
264 installed it. Those packages were most likely modified when I updated
265 from <path>gnupg-1.0.6</path> to <path>gnupg-1.0.7</path>. Note that the last two
266lines indicate
267 that 0 of 101 files from <path>gnupg-1.0.7</path> have been changed since I
268installed. That
269 is good. If any of them had been changed, I would be worried.
270 </p>
271 307
308<p>
309Notice how <c>jre</c> is a direct dependency and <c>jdk</c> is an indirect
310dependency if the <c>java</c> USE flag is set.
311</p>
312
272 </body> 313</body>
273 </section> 314</section>
274 <section> 315<section>
275 <title>But Wait... There's More</title> 316<title>Listing Files Installed by a Package with files (f)</title>
276 <body> 317<body>
277 <p>
278 <c>qpkg</c> can be used for other querying tasks that I will not go over here. There
279is a very complete
280 manpage for <c>qpkg</c>. Consult that for more information.
281 </p>
282 318
319<p>
320<c>equery</c> can list all the files installed by an ebuild with the
321<c>files</c> module. Try <c>--tree</c> to get an easy to read directory
322layout. Use <c>--filter</c> to only find a certain type of file. For example,
323to find where executables were installed, use <c>--filter=cmd</c>, and to
324quickly find the configuration file location, try <c>--filter=conf</c>.
325</p>
326
327<pre caption="Listing Installed Files in Tree Format">
328$ <i>equery files --tree gentoolkit</i>
329 * Searching for gentoolkit ...
330 * Contents of app-portage/gentoolkit-0.3.0_rc7:
331 /etc
332 > /eclean
333 + distfiles.exclude
334 + packages.exclude
335 > /env.d
336 + 99gentoolkit-env
337 > /revdep-rebuild
338 + 99revdep-rebuild
339 /usr
340 > /bin
341 + eclean
342 + eclean-dist -> eclean
343 + eclean-pkg -> eclean
344 + epkginfo
345 + equery
346 + eread
347 + euse
348 + glsa-check
349 + revdep-rebuild
350 > /lib
351 > /python2.6
352 > /site-packages
353 > /gentoolkit
354 + gentoolkit-0.3.0_rc7-py2.6.egg-info
355 + __init__.py
356 > /equery
357 + __init__.py
358 + belongs.py
359 + changes.py
360 + check.py
361 + depends.py
362 + depgraph.py
363 + files.py
364[...]
365</pre>
366
283 </body> 367</body>
284 </section> 368</section>
369<section>
370<title>Looking for Packages that Have a Specific USE Flag with hasuse (h)</title>
371<body>
372
373<p>
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
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.
378</p>
379
380<pre caption="Searching For Installed Packages that Use the qt3 or qt4 USE Flags">
381$ <i>equery hasuse qt3 qt4</i>
382 * Searching for USE flag qt3 ...
383[IP-] [ ] app-crypt/pinentry-0.7.5 (0)
384[IP-] [ ] net-dns/avahi-0.6.24-r2 (0)
385[IP-] [ ] net-wireless/wpa_supplicant-0.6.9 (0)
386
387 * Searching for USE flag qt4 ...
388[IP-] [ ] net-dns/avahi-0.6.24-r2 (0)
389[IP-] [ ] net-wireless/wpa_supplicant-0.6.9 (0)
390</pre>
391
392</body>
393</section>
394<section>
395<title>Listing Packages with list (l)</title>
396<body>
397
398<p>
399<c>list</c> is a simple, yet powerful module to list packages that are
400installed, in the Portage tree or in an overlay.
401</p>
402
403<pre caption="Listing Installed Packages with list">
404$ <i>equery list '*'</i>
405 * Searching for * ...
406[IP-] [ ] app-admin/eselect-1.2.3 (0)
407[IP-] [ ] app-admin/eselect-ctags-1.10 (0)
408[IP-] [ ] app-admin/eselect-esd-20060719 (0)
409[IP-] [ ] app-admin/eselect-fontconfig-1.0 (0)
410[IP-] [ ] app-admin/eselect-opengl-1.0.8-r1 (0)
411[IP-] [ ] app-admin/eselect-python-20090824 (0)
412[IP-] [ ] app-admin/eselect-ruby-20081227 (0)
413[IP-] [ ] app-admin/eselect-vi-1.1.5 (0)
414[IP-] [ ] app-admin/perl-cleaner-1.05 (0)
415[IP-] [ ] app-admin/pessulus-2.24.0 (0)
416[IP-] [ ] app-admin/python-updater-0.7 (0)
417[IP-] [ ] app-admin/sudo-1.7.2_p1 (0)
418[...]
419</pre>
420
421<p>
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
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
426in the default slot (0).
427</p>
428
429<p>
430This time we are going to use local options to look for packages in the
431Portage tree and overlays.
432</p>
433
434<pre caption="Using Local Options with list">
435$ <i>equery list -po vim</i>
436 * Searching for vim ...
437[-P-] [ ] app-editors/vim-7.0.235 (0)
438[-P-] [ ~] app-editors/vim-7.0.243 (0)
439[-P-] [ ] app-editors/vim-7.1.123 (0)
440[-P-] [ ~] app-editors/vim-7.1.330 (0)
441[-P-] [ ] app-editors/vim-7.2 (0)
442[-P-] [ ~] app-editors/vim-7.2.108 (0)
443[IP-] [ ] app-editors/vim-7.2.182 (0)
444[-P-] [ ~] app-editors/vim-7.2.238 (0)
445[-P-] [ ~] app-editors/vim-7.2.264 (0)
446</pre>
447
448<p>
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
451masked by the <c>~</c> in the second field.
452</p>
453
454</body>
455</section>
456<section>
457<title>Viewing Package Metadata with meta (m)</title>
458<body>
459
460<p>
461Each package in the Portage tree provides at least some metadata about
462its maintainer, herd, etc. Read about <uri
463link="http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&amp;chap=4">
464Gentoo Metadata</uri>. The amount of useful information depends on how much
465package maintainers decide to provide. With no options, <c>meta</c> returns
466some basic useful information.
467</p>
468
469<pre caption="Getting Package Metadata with meta">
470$ <i>equery meta gnucash</i>
471 * app-office/gnucash [gentoo]
472 Herd: gnome-office (gnome-office@gentoo.org)
473 Maintainer: tove@gentoo.org (Torsten Veller)
474 Upstream: None specified
475 Location: /usr/portage/app-office/gnucash
476 Keywords: 2.2.9-r1:0: alpha amd64 ppc sparc x86
477 Keywords: 2.2.9-r2:0:
478 Keywords: 2.3.8:0:
479 Keywords: 2.3.10:0: ~alpha ~amd64 ~ppc ~sparc ~x86
480</pre>
481
482<p>
483When the maintainer provides extra information, it can be very useful:
484</p>
485
486<pre caption="Getting Long Package Descriptions with meta">
487$ <i>equery meta --description emacs</i>
488 * app-editors/emacs
489 GNU Emacs is an extensible, customizable text editor - and more. At its core
490 is an interpreter for Emacs Lisp, a dialect of the Lisp programming language
491 with extensions to support text editing. The features of GNU Emacs include:
492 * Content-sensitive editing modes, including syntax coloring, for a wide
493 variety of file types including plain text, source code, and HTML.
494 * Complete built-in documentation, including a tutorial for new users.
495 * Support for many languages and their scripts, including all the European
496 "Latin" scripts, Russian, Greek, Japanese, Chinese, Korean, Thai,
497 Vietnamese, Lao, Ethiopian, and some Indian scripts.
498 * Highly customizable, using Emacs Lisp code or a graphical customization
499 interface.
500 * A large number of extensions that add other functionality, including a
501 project planner, mail and news reader, debugger interface, calendar, and
502 more. Many of these extensions are distributed with GNU Emacs; others are
503 available separately.
504</pre>
505
506</body>
507</section>
508<section>
509<title>Finding Package Sizes with size (s)</title>
510<body>
511
512<p>
513Have you ever been curious to find out how much space a specific package is
514occupying? Since a package could have its files over a number of directories,
515the usual <c>du -hc</c> might not give you the correct figure. Not to worry,
516here comes <c>equery</c> to the rescue!
517</p>
518
519<pre caption="Displaying Package Size">
520$ <i>equery size openoffice-bin</i>
521 * app-office/openoffice-bin-3.1.1
522 Total files : 4624
523 Total size : 361.38 MiB
524</pre>
525
526<p>
527As you can see, <c>size</c> prints the total space used in human-readable
528units and lists the total number of files the package has. To get the
529total size in bytes, use <c>--bytes</c>.
530</p>
531
532</body>
533</section>
534<section>
535<title>Listing Per-Package USE Flags with uses (u)</title>
536<body>
537
538<p>
539<c>equery</c>'s <c>uses</c> module can provide information about what USE
540flags are available for a specific package, and which of those flags is
541currently enabled.
542</p>
543
544<pre caption="Showing Set and Unset USE Flags">
545$ <i>equery uses gst-plugins-meta</i>
546 * Searching for gst-plugins-meta ...
547[ Legend : U - flag is set in make.conf ]
548[ : I - package is installed with flag ]
549[ Colors : set, unset ]
550 * Found these USE flags for media-plugins/gst-plugins-meta-0.10-r2:
551 U I
552 + + X : Adds support for X11
553 - - a52 : Enables support for decoding ATSC A/52 streams used in DVD
554 + + alsa : Adds support for media-libs/alsa-lib (Advanced Linux Sound
555 Architecture)
556 - - dvb : Adds support for DVB (Digital Video Broadcasting)
557 + + dvd : Adds support for DVDs
558 + + esd : Adds support for media-sound/esound (Enlightened Sound Daemon)
559 + + ffmpeg : Enable ffmpeg-based audio/video codec support
560 + + flac : Adds support for FLAC: Free Lossless Audio Codec
561 - - mad : Adds support for mad (high-quality mp3 decoder library and cli
562 frontend)
563 + + mpeg : Adds libmpeg3 support to various packages
564 - - mythtv : Support for retrieval from media-tv/mythtv backend
565 + + ogg : Adds support for the Ogg container format (commonly used by
566 Vorbis, Theora and flac)
567 - - oss : Adds support for OSS (Open Sound System)
568 + + theora : Adds support for the Theora Video Compression Codec
569 + + vorbis : Adds support for the OggVorbis audio codec
570 - - xv : Adds in optional support for the Xvideo extension (an X API for
571 video playback)
572</pre>
573
574<p>
575Here, a number of USE flags are enabled in <c>gstreamer</c>'s plugin
576meta-package, but you can see that there are other USE flags available.
577For more information on USE flags, please refer to the <uri
578link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">USE Flags</uri>
579chapter of the <uri link="/doc/en/handbook/">Gentoo Handbook</uri>.
580</p>
581
582</body>
583</section>
584<section>
585<title>Finding the Ebuild Path with which (w)</title>
586<body>
587
588<p>
589<c>which</c> is a simple script to help you quickly find the file path to an
590ebuild. If you pass an unversioned package name, <c>which</c> will return the
591path to the newest installable ebuild version, in other words, the ebuild
592Portage would use if you typed <c>emerge package</c>. Pass in a versioned
593package to get the path to that ebuild.
594</p>
595
596<pre caption="Displaying the Latest Installable Ebuild Path">
597$ <i>equery which gnome</i>
598/usr/portage/gnome-base/gnome/gnome-2.26.3.ebuild
599</pre>
600
601<p>
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
604like <c>cat</c>, <c>less</c> or <c>grep</c>:
605</p>
606
607<pre caption="Other Useful Ways to Use which">
608$ <i>grep HOMEPAGE $(equery which gentoolkit)</i>
609HOMEPAGE="http://www.gentoo.org/proj/en/portage/tools/index.xml"
610</pre>
611
612<warn>
613Be aware that <c>equery</c> currently changes the format of the output if it
614is sent through a pipe. The piped format is intended to be easier to parse by
615tools, but you can also turn it off by adding the <c>--no-pipe</c> option. If
616you write scripts that employ <c>equery</c>, you should be aware of this.
617</warn>
618
619</body>
620</section>
285</chapter> 621</chapter>
622
286<chapter> 623<chapter>
287 <title>lintool</title> 624<title>euse</title>
288 <section> 625<section>
289 <title>Introduction</title> 626<title>Introduction</title>
290 <body> 627<body>
291 <p>
292 628
293 <c>lintool</c> is a program that checks ebuild scripts for conformance to 629<p>
294 standards and requirements. It is important for ebuild developers to use <c>lintool</c> 630<c>euse</c> is a tool to see, set and unset USE flags at various places. For
295 to ensure that they are doing things correctly and not requiring the core team 631more information on USE flags, please refer to the <uri
296 to do more than they already have to in order to include the ebuild in the Gentoo 632link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">USE Flags</uri>.
297 repository. 633Please see <c>euse -h</c> for complete help and all options.
298 </p> 634</p>
635
299 </body> 636</body>
300 </section> 637</section>
301 <section> 638<section>
302 <title>Use</title> 639<title>Viewing, Setting and Unsetting USE Flags</title>
303
304 <body> 640<body>
305 <p>
306 Running <c>lintool</c> will produce a nicely formatted list of checks and results that
307 it performs.
308 </p>
309 <pre>
310hebron portage # <i>lintool app-crypt/gnupg/gnupg-1.0.7.ebuild
311app-crypt/gnupg/gnupg-1.0.7.ebuild : Not OK
312 641
313------------------------------------------------------------------------------- 642<p>
314 Summary for all 1 ebuild(s) checked # errors/warns 643The <c>euse -a</c> command reads the current active USE flags and displays
315 ------------------------------------------------------------------------------- 644them.
316 Testing for illegal space characters, weird backslash formatting : 0 / 0 645</p>
317 Testing for malformed headers : 0 / 1
318 Testing for occurence of deprecated try : 0 / 0
319 Testing for superfluous A=${P}.tar.gz : 0 / 0
320 Testing for empty DEPEND : 0 / 0
321 Testing for empty HOMEPAGE : 0 / 0
322 Testing for empty DESCRIPTION : 0 / 0
323 Testing for presence of env vars : 1 / 1
324 Testing for sane USE flag usage : 0 / 0
325 646
326 Total number of ebuilds with errors : 1 (100%) 647<note>
327 Total number of ebuilds with warnings : 1 (100%) 648There are 5 &quot;columns&quot; that <c>euse</c> now uses to show whether a
328 </i> </pre> 649flag is set/unset and where all the flag has been set. The columns are as
329 <p> 650follows -- +/-, set in the Environment, set in make.Conf, set in make.Defaults,
330 The first line summarizes whether the ebuild is okay or not. In the case of 651and set in make.Globals. The output looks like [+ECDG].
331 <c>gnupg-1.0.7.ebuild</c>, it's not. Reading through the list of checks, we can see 652</note>
332 that it got a warning for malformed headers and an error for presence of env
333 vars.
334 </p>
335 653
336 <p> 654<pre caption="Viewing all active USE flags">
337 Looking at the ebuild, I see that it is missing a couple of required 655# <i>euse -a</i>
338 env vars (LICENSE and RDEPEND). Adding those fixes the error. But there are 656X [+ CD ]
339 still two warnings -- one for malformed headers and one for env vars. To help 657aalib [+ ]
340 me find those, I can run <c>lintool</c> again with <c>--show-details</c> 658acpi [+ C ]
341 </p> 659alsa [+ C ]
342 <pre> 660apache2 [+ C ]
343hebron gnupg # <i>lintool --show-details ./gnupg-1.0.7.ebuild 661apm [+ D ]
344 662avi [+ D ]
345------------------------------------------------------------------------------- 663berkdb [+ D ]
346# Some data cut for brevity.... 664bitmap-fonts [+ D ]
665bonobo [+ ]
666cdr [+ C ]
667crypt [+ CD ]
668cscope [+ C ]
669cups [+ CD ]
670curl [+ ]
671emboss [+ D ]
672encode [+ D ]
673esd [+ ]
674fam [+ ]
675fbcon [+ C ]
676firefox [+ C ]
677font-server [+ D ]
678foomaticdb [+ D ]
679fortran [+ D ]
680gd [+ C ]
681gdbm [+ D ]
682gif [+ CD ]
683gimpprint [+ C ]
684gnome [+ CD ]
685gphoto2 [+ ]
686gpm [+ CD ]
687gstreamer [+ C ]
688gtk [+ D ]
689gtkhtml [+ C ]
690guile [+ ]
691imagemagick [+ ]
692imlib [+ CD ]
693innodb [+ ]
694ipv6 [+ D ]
695javascript [+ C ]
696jpeg [+ CD ]
697kde [+ D ]
698ldap [+ ]
699libg++ [+ CD ]
700libwww [+ CD ]
701mad [+ CD ]
702mbox [+ C ]
703md5sum [+ C ]
704mikmod [+ CD ]
705mmx [+ C ]
706motif [+ CD ]
707mp3 [+ ]
708mpeg [+ CD ]
709mpeg4 [+ C ]
710mysql [+ C ]
711ncurses [+ CD ]
712nls [+ D ]
713nvidia [+ C ]
714odbc [+ ]
715offensive [+ ]
716ogg [+ CD ]
717opengl [+ CD ]
718oss [+ D ]
719pam [+ CD ]
720pdflib [+ CD ]
721perl [+ CD ]
722png [+ CD ]
723python [+ CD ]
724qt [+ D ]
725quicktime [+ CD ]
726readline [+ CD ]
727ruby [+ ]
728sdl [+ CD ]
729slang [+ D ]
730spell [+ CD ]
731sse [+ C ]
732ssl [+ CD ]
733svga [+ CD ]
734tcltk [+ C ]
735tcpd [+ D ]
736tiff [+ C ]
737truetype [+ CD ]
738usb [+ C ]
739vanilla [+ C ]
740x86 [+ C ]
741xml [+ ]
742xosd [+ C ]
743xv [+ CD ]
744xvid [+ C ]
745zlib [+ CD ]
746</pre>
347 747
348 Status for ./gnupg-1.0.7.ebuild 748<p>
349* Testing for malformed headers : passed 749Similarly you can use the <c>euse -a -g</c> command to only view active global
350- (W) Has illegal or suspect headers: 750USE flags. The <c>euse -a -l</c> command does the same for active local USE
351 |Suspect copyright year: # Copyright 1999-2000 Gentoo Technologies, Inc. 751flags.<c>-g</c> &amp; <c>-l</c> are suboptions to <c>euse</c> and need an
352 * Testing for occurence of deprecated try : passed 752option before them (like <c>-a</c>) to function correctly.
353 * Testing for superfluous A=${P}.tar.gz : passed 753</p>
354 * Testing for empty DEPEND : passed
355 * Testing for empty HOMEPAGE : passed
356 * Testing for empty DESCRIPTION : passed
357 * Testing for presence of env vars : passed
358 - (W) Missing SLOT=
359 * Testing for sane USE flag usage : passed
360 754
361 ------------------------------------------------------------------------------- 755<pre caption="Viewing active local USE flags">
362 Summary for all 1 ebuild(s) checked # errors/warns 756# <i>euse -a -l</i>
363 ------------------------------------------------------------------------------- 757bitmap-fonts [+ D ]
364 Testing for illegal space characters, weird backslash formatting : 0 / 0 758font-server [+ D ]
365 Testing for malformed headers : 0 / 1 759fortran [+ D ]
366 Testing for occurence of deprecated try : 0 / 0 760gimpprint [+ C ]
367 Testing for superfluous A=${P}.tar.gz : 0 / 0 761md5sum [+ C ]
368 Testing for empty DEPEND : 0 / 0 762mpeg4 [+ C ]
369 Testing for empty HOMEPAGE : 0 / 0 763nvidia [+ C ]
370 Testing for empty DESCRIPTION : 0 / 0 764offensive [+ ]
371 Testing for presence of env vars : 0 / 1 765truetype [+ CD ]
372 Testing for sane USE flag usage : 0 / 0 766</pre>
373 767
374 Total number of ebuilds with errors : 0 (0%) 768<p>
375 Total number of ebuilds with warnings : 1 (100%) 769We can also use <c>euse</c> to set or unset use flags. The commands used for
376 </i> </pre> 770this are <c>euse -E flagname</c> (enable a flag) and <c>euse -D flagname</c>
377 <p>Now I can see that the year in the ebuild is probably wrong, and that it is 771(disable a flag).
378 missing the SLOT variable. Fixing those eliminates all warnings.</p> 772</p>
379 773
774<warn>
775Do not use the <c>euse -E</c> or <c>euse -D</c> commands by themselves (without
776a flag). It will set/unset ALL USE flags in <c>/etc/portage/make.conf</c>. Although a
777backup is kept at <path>/etc/portage/make.conf.euse_backup</path>, please be careful
778while using <c>euse -E</c> or <c>euse -D</c>.
779</warn>
780
781<pre caption="Setting and Unsetting USE flags">
782<comment>(Enabling a USE Flag)</comment>
783# <i> euse -E 3dfx</i>
784/etc/portage/make.conf was modified, a backup copy has been placed at /etc/portage/make.conf.euse_backup
785
786<comment>(/etc/portage/make.conf after the command)</comment>
787USE="alsa acpi apache2 -arts cups cdr crypt cscope -doc fbcon \
788 firefox gd gif gimpprint gnome gpm gstreamer gtkhtml imlib \
789 innodb -java javascript jpeg libg++ libwww mad mbox md5sum \
790 mikmod mmx motif mpeg mpeg4 mysql ncurses nvidia \
791 ogg odbc offensive opengl pam pdflib perl png python \
792 quicktime readline sdl spell sse ssl svga tcltk tiff truetype usb \
793 vanilla X xosd xv xvid x86 zlib 3dfx"
794
795<comment>(Disabling the USE Flag)</comment>
796# <i> euse -D 3dfx</i>
797/etc/portage/make.conf was modified, a backup copy has been placed at /etc/portage/make.conf.euse_backup
798
799<comment>(/etc/portage/make.conf after the command)</comment>
800USE="alsa acpi apache2 -arts cups cdr crypt cscope -doc fbcon \
801 firefox gd gif gimpprint gnome gpm gstreamer gtkhtml imlib \
802 innodb -java javascript jpeg libg++ libwww mad mbox md5sum \
803 mikmod mmx motif mpeg mpeg4 mysql ncurses nvidia \
804 ogg odbc offensive opengl pam pdflib perl png python \
805 quicktime readline sdl spell sse ssl svga tcltk tiff truetype usb \
806 vanilla X xosd xv xvid x86 zlib -3dfx"
807</pre>
808
809<note>
810<c>euse</c> does not physically remove the flag from make.conf. It just adds a
811- (minus) before the flag to unset it. You may have to manually clean up your
812make.conf to avoid unwanted variables.
813</note>
814
380 </body> 815</body>
381 </section> 816</section>
382</chapter> 817</chapter>
818
383<chapter> 819<chapter>
384 820<title>Other tools</title>
385 <title>epm</title>
386 <section> 821<section>
387 <title>Introduction</title> 822<title>revdep-rebuild</title>
388 <body> 823<body>
389 <p>
390 <c>epm</c> is a package managing tool that clones Red Hat rpm commands. As it stands
391 now, it does not offer all of the features of rpm, but it offers some of the more
392 powerful rpm query options.
393 </p>
394 824
395 <p> 825<p>
396 It also handles removing packages, which is not covered here. Use <c>epm --help</c> 826This tool is Gentoo's Reverse Dependency rebuilder. It will scan your installed
397 to learn more about deleting packages with <c>epm</c>. 827ebuilds to find packages that have become broken as a result of an upgrade of a
398 </p> 828package they depend on. It can emerge those packages for you but it can also
829happen that a given package does not work any more with the currently installed
830dependencies, in which case you should upgrade the broken package to a more
831recent version. revdep-rebuild will pass flags to emerge which lets you use the
832<c>--pretend</c> flag to see what is going to be emerged again before you go any
833further.
834</p>
835
836<pre caption="Running revdep-rebuild in pretend mode">
837# <i>revdep-rebuild -p</i>
838
839 * Configuring search environment for revdep-rebuild
840
841 * Checking reverse dependencies
842 * Packages containing binaries and libraries broken by a package update
843 * will be emerged.
844
845 * Collecting system binaries and libraries
846 * Generated new 1_files.rr
847 * Collecting complete LD_LIBRARY_PATH
848 * Generated new 2_ldpath.rr
849 * Checking dynamic linking consistency
850[ 48% ] * broken /usr/lib/gstreamer-0.10/libgsttaglib.la (requires /usr/lib/libtag.la)
851[ 64% ] * broken /usr/lib/libgdkglext-x11-1.0.la (requires /usr/lib/libGLU.la)
852[ 67% ] * broken /usr/lib/libgtkglext-x11-1.0.la (requires /usr/lib/libGLU.la)
853[ 85% ] * broken /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gdkgl/_gdkgl.la (requires /usr/lib/libGLU.la)
854 * broken /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gtkgl/_gtkgl.la (requires /usr/lib/libGLU.la)
855[ 97% ] * broken /usr/qt/3/lib/libqt-mt.la (requires -lpng)
856[ 100% ]
857 * Generated new 3_broken.rr
858 * Assigning files to packages
859 * /usr/lib/gstreamer-0.10/libgsttaglib.la -> media-plugins/gst-plugins-taglib
860 * /usr/lib/libgdkglext-x11-1.0.la -> x11-libs/gtkglext
861 * /usr/lib/libgtkglext-x11-1.0.la -> x11-libs/gtkglext
862 * /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gdkgl/_gdkgl.la -> dev-python/pygtkglext
863 * /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gtkgl/_gtkgl.la -> dev-python/pygtkglext
864 * /usr/qt/3/lib/libqt-mt.la -> x11-libs/qt
865 * Generated new 4_raw.rr and 4_owners.rr
866 * Cleaning list of packages to rebuild
867 * Generated new 4_pkgs.rr
868 * Assigning packages to ebuilds
869 * Generated new 4_ebuilds.rr
870 * Evaluating package order
871 * Generated new 5_order.rr
872 * All prepared. Starting rebuild
873emerge --oneshot --pretend dev-python/pygtkglext:0
874media-plugins/gst-plugins-taglib:0.10
875x11-libs/gtkglext:0
876x11-libs/qt:3
877
878These are the packages that would be merged, in order:
879
880Calculating dependencies... done!
881[ebuild R ] media-plugins/gst-plugins-taglib-0.10.17
882[ebuild R ] x11-libs/gtkglext-1.2.0
883[ebuild R ] x11-libs/qt-3.3.8b-r2
884[ebuild R ] dev-python/pygtkglext-1.1.0
885 * Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.
886</pre>
887
888<p>
889If you need to rebuild some packages, you may run <c>revdep-rebuild</c> without
890the <c>-p</c> flag and the listed packages will be emerged again.
891</p>
892
399 </body> 893</body>
400 </section> 894</section>
401 <section> 895<section>
402 896<title>glsa-check</title>
403 <title>Querying Packages with epm</title>
404 <body> 897<body>
405 <p>
406 <c>epm</c> functions with essentially the same command line functions as Red Hat's
407 rpm. <c>epm -qa</c> lists all packages installed. <c>epm -ql</c> lists all the
408 files from a specific ebuild.
409 </p>
410 898
411 <pre> 899<p>
412hebron etc # <i>epm -ql ethereal 900<c>glsa-check</c> is mainly a test tool that keeps track of the various GLSA's
413/usr/lib/ethereal/plugins/0.8.20/gryphon.so 901(Gentoo Linux Security Advisory) and will eventually be integrated into
414/usr/lib/ethereal/plugins/0.8.20/gryphon.la 902<c>emerge</c> and <c>equery</c>.
415/usr/lib/ethereal/plugins/0.8.20/gryphon.a 903</p>
416/usr/lib/ethereal/plugins/0.8.20/mgcp.so
417/usr/lib/ethereal/plugins/0.8.20/mgcp.la
418/usr/lib/ethereal/plugins/0.8.20/mgcp.a
419/usr/lib/ethereal/plugins/0.8.20/cosnaming.so
420/usr/lib/ethereal/plugins/0.8.20/cosnaming.la
421/usr/lib/ethereal/plugins/0.8.20/cosnaming.a
422/usr/lib/ethereal/plugins/0.8.20/coseventcomm.so
423/usr/lib/ethereal/plugins/0.8.20/coseventcomm.la
424/usr/lib/ethereal/plugins/0.8.20/coseventcomm.a
425/usr/bin/ethereal
426/usr/bin/editcap
427/usr/bin/mergecap
428/usr/bin/tethereal
429/usr/bin/text2pcap
430/usr/bin/idl2eth
431/usr/share/man/man1/idl2eth.1.gz
432/usr/share/man/man1/tethereal.1.gz
433/usr/share/man/man1/text2pcap.1.gz
434/usr/share/man/man1/editcap.1.gz
435/usr/share/man/man1/ethereal.1.gz
436/usr/share/man/man1/mergecap.1.gz
437/usr/share/doc/ethereal-0.8.20/AUTHORS.gz
438/usr/share/doc/ethereal-0.8.20/COPYING.gz
439/usr/share/doc/ethereal-0.8.20/NEWS.gz
440/usr/share/doc/ethereal-0.8.20/ChangeLog.gz
441/usr/share/doc/ethereal-0.8.20/README.gz
442/usr/share/doc/ethereal-0.8.20/INSTALL.configure.gz
443/usr/share/doc/ethereal-0.8.20/TODO.gz
444/usr/share/doc/ethereal-0.8.20/README.aix.gz
445/usr/share/doc/ethereal-0.8.20/README.bsd.gz
446/usr/share/doc/ethereal-0.8.20/README.hpux.gz
447/usr/share/doc/ethereal-0.8.20/README.irix.gz
448/usr/share/doc/ethereal-0.8.20/README.linux.gz
449/usr/share/doc/ethereal-0.8.20/README.tru64.gz
450/usr/share/doc/ethereal-0.8.20/README.win32.gz
451/usr/share/doc/ethereal-0.8.20/README.vmware.gz
452/etc/ethereal/manuf </i>
453 </pre>
454 <p>
455 <c>epm</c> offers a few advanced query options that are not present in <c>qpkg</c>
456at the
457 time of this writing. For instance, it can query for just configuration files or
458just documentation
459 files.
460 </p>
461 <pre>
462 904
463hebron etc # <i>epm -qc ethereal
464/etc/ethereal/manuf
465
466hebron etc # epm -qd ethereal
467/usr/share/man/man1/idl2eth.1.gz
468/usr/share/man/man1/tethereal.1.gz
469/usr/share/man/man1/text2pcap.1.gz
470/usr/share/man/man1/editcap.1.gz
471/usr/share/man/man1/ethereal.1.gz
472/usr/share/man/man1/mergecap.1.gz
473/usr/share/doc/ethereal-0.8.20/AUTHORS.gz
474/usr/share/doc/ethereal-0.8.20/COPYING.gz
475/usr/share/doc/ethereal-0.8.20/NEWS.gz
476/usr/share/doc/ethereal-0.8.20/ChangeLog.gz
477/usr/share/doc/ethereal-0.8.20/README.gz
478/usr/share/doc/ethereal-0.8.20/INSTALL.configure.gz
479/usr/share/doc/ethereal-0.8.20/TODO.gz
480/usr/share/doc/ethereal-0.8.20/README.aix.gz
481/usr/share/doc/ethereal-0.8.20/README.bsd.gz
482/usr/share/doc/ethereal-0.8.20/README.hpux.gz
483/usr/share/doc/ethereal-0.8.20/README.irix.gz
484/usr/share/doc/ethereal-0.8.20/README.linux.gz
485/usr/share/doc/ethereal-0.8.20/README.tru64.gz
486/usr/share/doc/ethereal-0.8.20/README.win32.gz
487/usr/share/doc/ethereal-0.8.20/README.vmware.gz
488 </i> </pre>
489 <note>
490 <c>epm --help</c> lists the options that epm <e>will eventually</e> support. Note,
491however, that
492 options prefixed with asterisks (*) are not yet implemented.
493 </note>
494 </body> 905</body>
495 </section> 906</section>
496</chapter>
497
498<chapter>
499 <title>Others</title>
500 <section> 907<section>
501 <title>etc-update</title> 908<title>eread</title>
502 <body> 909<body>
503 <!--
504 - Feel free to add more to this. It probably deserves its own chapter, but I don't
505 - use it, so I can't really write much about it.
506 -->
507 <p>
508 <c>etc-update</c> provides a convenient alternative to updating configuration
509 files by hand. After running an emerge that changes configuration files, you
510 can run etc-update to step you through the process of updating all impacted
511 configuration files.
512 </p>
513 910
514 <p> 911<p>
515 It is driven by a menu-based interface and includes the ability to view and merge 912<c>eread</c> is a simple utility to display elog files produced by
516 in config files before deciding what to do. 913>=<c>portage-2.1</c>. You can set the saving of elog files by setting a couple
517 </p> 914of variables in <path>/etc/portage/make.conf</path>:
915</p>
916
917<pre caption="Enabling elog in /etc/portage/make.conf">
918PORTAGE_ELOG_CLASSES="log"
919PORTAGE_ELOG_SYSTEM="save"
920</pre>
921
922<note>
923This is just one way of saving elog messages. For more information on how
924Portage's elog system works, please refer to the appropriate page in the <uri
925link="/doc/en/handbook/handbook-x86.xml?part=3&amp;chap=1#doc_chap4">Portage
926Handbook</uri>.
927</note>
928
929<p>
930Once you've set up elog to your satisfaction, just run <c>eread</c> to view your
931log files.
932</p>
933
934<pre caption="Using eread">
935$ <i>eread</i>
936
937This is a list of portage log items. Choose a number to view that file or type
938q to quit.
939
9401) app-portage:gentoolkit-0.2.4_pre2:20070320-000256.log
9412) app-portage:gentoolkit-0.2.4_pre2:20070320-000258.log
9423) app-portage:gentoolkit-0.2.4_pre2:20070320-000319.log
9434) app-portage:gentoolkit-0.2.3:20070320-000408.log
944Choice?
945</pre>
946
947<p>
948Select a number and the file will be displayed using the paging program
949specified in the PAGER environment variable. If PAGER is not set, it will use
950<c>less</c>.
951</p>
952
953<p>
954After displaying the elog item, you will be prompted if you want to delete the
955file.
956</p>
957
518 </body> 958</body>
519 </section> 959</section>
520 <section> 960<section>
521 <title>gentool</title> 961<title>eclean</title>
522 <body> 962<body>
523 <p>gentool is a collective name for several small scripts that analyze ebuild
524statistics.
525 For instance, gentool-total-coverage prints a list of email addresses and the
526 number of ebuilds each has in the portage tree.
527 </p>
528 963
964<p>
965<c>eclean</c> is a tool to remove old source files and old binary packages from
966your system.
967</p>
968
969<p>
970When you build and install packages, the source files are downloaded and
971preserved in DISTDIR, usually <path>/usr/portage/distfiles</path>. This can
972accumulate several gigs of material over time if you don't clean it
973periodically. You can run <c>eclean-dist</c> to clean only source files from
974DISTDIR.
975</p>
976
977<p>
978You can create archives of installed packages by using <c>quickpg</c> or
979FEATURES="buildpkg". These archived packages are kept in PKGDIR, usually
980<path>/usr/portage/packages</path>. When you no longer need to keep them around,
981or if they're too old, you can run <c>eclean-pkg</c> to remove them from PKGDIR.
982It's a good way to ensure that any binary packages you have are only the latest
983versions.
984</p>
985
986<p>
987For more information on <c>eclean</c> and tips on maintaining a cruft-free
988system, please read <c>man eclean</c>.
989</p>
990
529 </body> 991</body>
530 </section> 992</section>
531 <section>
532 <title>pkg-size</title>
533 <body>
534 <p><c>pkg-size</c> prints the size of the installed files in a given package.
535 </p>
536 <pre>
537
538hebron portage # <i>pkg-size nmap
539net-analyzer/nmap-2.54_beta24-r1 897024 (876KB) </i>
540 </pre>
541 </body>
542 </section>
543 <section>
544 <title>mkebuild</title>
545 <body>
546 <p><c>mkebuild</c> simplifies the process of creating a new ebuild by automating as
547much
548 of the process as possible. Running <c>mkebuild [filename]</c> will create an
549 ebuild for that file. the file should be an archive of some kind. As it works, it
550 will provide
551 feedback about changes you may need to make.
552 </p>
553
554 </body>
555 </section>
556 <section>
557 <title>emerge-webrsync</title>
558 <body>
559 <!-- Can't find any documentation on this anywhere... not even a comment in the
560code. -->
561 <p>Downloads the daily snapshot over HTTP with wget, and (optionally) syncs with
562portage.
563 </p>
564 </body>
565
566 </section>
567</chapter> 993</chapter>
568</guide> 994</guide>
569

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.20