/[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.17 Revision 1.18
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.17 2004/10/24 22:48:37 neysx Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoolkit.xml,v 1.18 2004/12/27 20:32:02 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 link="/doc/en/gentoolkit.xml">
6<title>Gentoolkit</title> 6<title>Gentoolkit</title>
7 7
8<author title="Author"> 8<author title="Author">
9 <mail link="mbutcher@aleph-null.tv">Matt Butcher</mail> 9 <mail link="mbutcher@aleph-null.tv">Matt Butcher</mail>
10</author> 10</author>
11<author title="Editor"> 11<author title="Editor">
12 <!-- zhen@gentoo.org -->John P. Davis 12 <!-- zhen@gentoo.org -->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"> 17<author title="Editor">
18 <mail link="fox2mike@gmail.com">Shyam Mani</mail> 18 <mail link="fox2mike@gmail.com">Shyam Mani</mail>
19</author> 19</author>
20<author title="Editor"> 20<author title="Editor">
21 <mail link="neysx@gentoo.org">Xavier Neys</mail> 21 <mail link="neysx@gentoo.org">Xavier Neys</mail>
22</author> 22</author>
23 23
24<!-- Licensed under GFDL --> 24<!-- Licensed under GFDL -->
25 25
26<abstract> 26<abstract>
27Gentoolkit is a suite of tools to ease the administration of a Gentoo system. 27Gentoolkit is a suite of tools to ease the administration of a Gentoo system.
28This document covers the basics of some of the tools present in Gentoolkit. 28This document covers the basics of some of the tools present in Gentoolkit.
29</abstract> 29</abstract>
30 30
31<version>1.4</version> 31<version>1.5</version>
32<date>August 25, 2004</date> 32<date>2004-12-27</date>
33 33
34<chapter> 34<chapter>
35<title>Introduction</title> 35<title>Introduction</title>
36<section> 36<section>
37<title>What is Gentoolkit?</title> 37<title>What is Gentoolkit?</title>
38<body> 38<body>
39 39
40<p> 40<p>
41Gentoo is a unique distribution and presents some complexities that simply 41Gentoo is a unique distribution and presents some complexities that simply
42don't exist for other distributions. As Gentoo developers and contributors 42don't exist for other distributions. As Gentoo developers and contributors
43discovered some of these complexities, they also wrote tools to help users and 43discovered some of these complexities, they also wrote tools to help users and
44administrators work around them. Many of these tools have been contributed to 44administrators work around them. Many of these tools have been contributed to
45the Gentoo project and are included in the package 45the Gentoo project and are included in the package
46<c>app-portage/gentoolkit</c>. 46<c>app-portage/gentoolkit</c>.
47</p> 47</p>
84</section> 84</section>
85<section> 85<section>
86<title>Finding Documentation</title> 86<title>Finding Documentation</title>
87<body> 87<body>
88 88
89<p> 89<p>
90Any documentation that a program might have (other than man pages) is stored in 90Any documentation that a program might have (other than man pages) is stored in
91<path>/usr/doc/gentoolkit-[version]/[program-name]/</path>. 91<path>/usr/doc/gentoolkit-[version]/[program-name]/</path>.
92</p> 92</p>
93 93
94</body> 94</body>
95</section> 95</section>
96</chapter> 96</chapter>
97 97
98<chapter> 98<chapter>
99<title>Querying Package Data with qpkg</title> 99<title>equery</title>
100<section> 100<section>
101<title>Introduction</title> 101<title>Introduction</title>
102<body> 102<body>
103 103
104<p> 104<p>
105<c>qpkg</c> is a flexible tool for determining information about installed
106ebuilds. It can provide information about what files belong to which ebuilds,
107whether multiple versions of the same package are installed and what a
108particular ebuild does. It can also be used to query some information about
109ebuilds that have not been installed.
110</p>
111
112<p>
113Calling <c>qpkg</c> with no arguments prints a list of all ebuilds with
114asterisks (*) next to the packages that are installed on the system.
115</p>
116
117<note>
118By default, <c>qpkg</c> prints output in color. To turn this off on the command
119line, use the <c>--no-color</c> or <c>-nc</c> flag.
120</note>
121
122</body>
123</section>
124<section>
125<title>Querying Package Information</title>
126<body>
127
128<p>
129One of the most common uses for <c>qpkg</c> is determining what a given package
130is. For instance, while looking through <path>net-misc</path>, I saw a package
131called <path>neon</path>. Having no idea what it was, I ran qpkg.
132</p>
133
134<pre caption="Package Information">
135# <i>qpkg -i net-misc/neon</i>
136net-misc/neon-0.24.4
137 HTTP and WebDAV client library [ http://www.webdav.org/neon ]
138net-misc/neon-0.23.8
139 HTTP and WebDAV client library [ http://www.webdav.org/neon ]
140net-misc/neon-0.24.6
141 HTTP and WebDAV client library [ http://www.webdav.org/neon/ ]
142net-misc/neon-0.24.5
143 HTTP and WebDAV client library [ http://www.webdav.org/neon ]
144net-misc/neon-0.24.0
145 HTTP and WebDAV client library [ http://www.webdav.org/neon ]
146net-misc/neon-0.21.3
147 HTTP and WebDAV client library [ http://www.webdav.org/neon ]
148net-misc/neon-0.23.9
149 HTTP and WebDAV client library [ http://www.webdav.org/neon ]
150net-misc/neon-0.24.7
151 HTTP and WebDAV client library [ http://www.webdav.org/neon/ ]
152net-misc/neon-0.24.2
153 HTTP and WebDAV client library [ http://www.webdav.org/neon ]
154</pre>
155
156<p>
157<c>qpkg</c> read through the ebuild files for the nine
158<path>net-misc/neon</path> ebuilds and printed out the information stored in
159DESCRIPTION and HOMEPAGE.
160</p>
161
162</body>
163</section>
164<section>
165<title>Listing Files Belonging to an Ebuild</title>
166<body>
167
168<p>
169<c>qpkg</c> can also list the files that belong to an installed ebuild. I
170know that gentoolkit installed several tools, but I don't know what they
171all are. To find out, I can do a <c>qpkg -l</c>.
172</p>
173
174<pre caption="Package File list using qpkg">
175# <i>qpkg -l app-portage/gentoolkit</i>
176app-portage/gentoolkit-0.2.0_pre8 *
177CONTENTS:
178/usr
179/usr/bin
180/usr/bin/euse
181/usr/bin/qpkg
182/usr/bin/etcat
183/usr/bin/revdep-rebuild
184/usr/bin/glsa-check
185/usr/bin/dep-clean
186/usr/bin/equery
187/usr/bin/ewhich
188/usr/bin/pkg-size
189/usr/lib
190/usr/lib/gentoolkit
191/usr/lib/gentoolkit/pym
192/usr/lib/gentoolkit/pym/glsa.py
193/usr/lib/gentoolkit/pym/gentoolkit.py
194/usr/sbin
195/usr/sbin/pkg-clean
196/usr/sbin/mkebuild
197/usr/share
198/usr/share/doc
199/usr/share/doc/gentoolkit-0.2.0_pre8
200/usr/share/doc/gentoolkit-0.2.0_pre8/NEWS
201/usr/share/doc/gentoolkit-0.2.0_pre8/TODO
202/usr/share/doc/gentoolkit-0.2.0_pre8/euse
203/usr/share/doc/gentoolkit-0.2.0_pre8/euse/TODO
204/usr/share/doc/gentoolkit-0.2.0_pre8/euse/README
205/usr/share/doc/gentoolkit-0.2.0_pre8/euse/AUTHORS
206/usr/share/doc/gentoolkit-0.2.0_pre8/euse/ChangeLog
207/usr/share/doc/gentoolkit-0.2.0_pre8/qpkg
208/usr/share/doc/gentoolkit-0.2.0_pre8/qpkg/README
209/usr/share/doc/gentoolkit-0.2.0_pre8/qpkg/AUTHORS
210/usr/share/doc/gentoolkit-0.2.0_pre8/qpkg/ChangeLog
211/usr/share/doc/gentoolkit-0.2.0_pre8/etcat
212/usr/share/doc/gentoolkit-0.2.0_pre8/etcat/README
213/usr/share/doc/gentoolkit-0.2.0_pre8/etcat/AUTHORS
214/usr/share/doc/gentoolkit-0.2.0_pre8/revdep-rebuild
215/usr/share/doc/gentoolkit-0.2.0_pre8/revdep-rebuild/TODO
216/usr/share/doc/gentoolkit-0.2.0_pre8/revdep-rebuild/README
217/usr/share/doc/gentoolkit-0.2.0_pre8/revdep-rebuild/AUTHORS
218/usr/share/doc/gentoolkit-0.2.0_pre8/README
219/usr/share/doc/gentoolkit-0.2.0_pre8/equery
220/usr/share/doc/gentoolkit-0.2.0_pre8/equery/README
221/usr/share/doc/gentoolkit-0.2.0_pre8/equery/AUTHORS
222/usr/share/doc/gentoolkit-0.2.0_pre8/AUTHORS
223/usr/share/doc/gentoolkit-0.2.0_pre8/gentoolkit
224/usr/share/doc/gentoolkit-0.2.0_pre8/gentoolkit/TODO
225/usr/share/doc/gentoolkit-0.2.0_pre8/gentoolkit/README
226/usr/share/doc/gentoolkit-0.2.0_pre8/gentoolkit/AUTHORS
227/usr/share/doc/gentoolkit-0.2.0_pre8/gentoolkit/ChangeLog
228/usr/share/doc/gentoolkit-0.2.0_pre8/ChangeLog
229/usr/share/doc/gentoolkit-0.2.0_pre8/COPYING
230/usr/share/man
231/usr/share/man/man1
232/usr/share/man/man1/revdep-rebuild.1.gz
233/usr/share/man/man1/mkebuild.1.gz
234/usr/share/man/man1/qpkg.1.gz
235/usr/share/man/man1/pkg-clean.1.gz
236/usr/share/man/man1/etcat.1.gz
237/usr/share/man/man1/ewhich.1.gz
238/usr/share/man/man1/equery.1.gz
239/usr/share/man/man1/euse.1.gz
240/usr/share/man/man1/dep-clean.1.gz
241/usr/share/man/man1/pkg-size.1.gz
242</pre>
243
244<note>
245In case you have gentoolkit-dev installed, <c>qpkg</c> will list out files for
246that as well, i.e. it displays the file list for all installed packages with
247the name gentoolkit.
248</note>
249
250</body>
251</section>
252<section>
253<title>Finding the Package That a File Came From</title>
254<body>
255
256<p>
257To find the package that a file came from, use the <c>-f</c> or
258<c>--find-file</c> flag.
259</p>
260
261<pre caption="Finding the ebuild that installed a given file">
262# <i>qpkg -f /usr/lib/mozilla</i>
263net-www/mozilla *
264</pre>
265
266</body>
267</section>
268<section>
269<title>Listing Duplicate Packages</title>
270<body>
271
272<p>
273Sometimes multiple versions of the same package may exist. <c>qpkg --dups</c>
274will print a list of duplicate packages. The existence of a duplicate package
275though may not indicate that the older version may be removed. They may fill
276different slots. To look for duplicates in the same slot, use <c>qpkg --dups
277--slot</c>. I just updated KDE from 3.0 to 3.0.2, so I have some duplicates in
278the same slot.
279</p>
280
281<pre caption="Finding duplicate packages">
282# <i>qpkg --dups --slot</i>
283app-portage/gentoolkit
284kde-base/kdeaddons
285kde-base/kdeadmin
286kde-base/kdeartwork
287kde-base/kdebase
288kde-base/kdegames
289kde-base/kdelibs
290kde-base/kdemultimedia
291kde-base/kdenetwork
292kde-base/kdetoys
293kde-base/kdeutils
294media-libs/freetype
295x11-libs/qt
296</pre>
297
298</body>
299</section>
300<section>
301<title>Verifying Package Integrity</title>
302<body>
303
304<p>
305Sometimes it is useful to check a package's integrity to know that files have
306not been replaced since they were installed. <c>qpkg</c> can verify md5 sums as
307well as install times to indicate whether files for the package might have been
308corrupted, replaced, or removed.
309</p>
310
311<p>
312To check both mtimes and md5 sums, use the <c>-c</c> flag.
313</p>
314
315<pre caption="See the Difference?">
316# <i>qpkg cdrtools -c -v</i>
317app-cdr/cdrtools-2.01_alpha25 *
318/etc/default/rscsi.dfl !mtime!
319/usr/bin/devdump !md5! !mtime!
320/usr/bin/mkisofs !md5! !mtime!
321/usr/bin/isovfy !md5! !mtime!
322/usr/bin/readcd !md5! !mtime!
323/usr/bin/cdda2wav !md5! !mtime!
324/usr/bin/cdrecord !md5! !mtime!
325/usr/bin/isodump !md5! !mtime!
326/usr/bin/isoinfo !md5! !mtime!
327/usr/lib/libfile.a !md5! !mtime!
328/usr/lib/librscg.a !md5! !mtime!
329/usr/lib/libunls.a !md5! !mtime!
330/usr/lib/libedc_ecc.a !md5! !mtime!
331/usr/lib/libdeflt.a !md5! !mtime!
332/usr/lib/libhfs.a !md5! !mtime!
333/usr/lib/libscg.a !md5! !mtime!
334/usr/lib/libparanoia.a !md5! !mtime!
335/usr/lib/libschily.a !md5! !mtime!
336/usr/sbin/rscsi !md5! !mtime!
337/usr/share/man/man1/cdrecord.1.gz !md5! !mtime!
338/usr/share/man/man1/readcd.1.gz !md5! !mtime!
339/usr/share/man/man1/cdda2wav.1.gz !md5! !mtime!
340/usr/share/man/man8/mkisofs.8.gz !md5! !mtime!
34176/150
342
343app-cdr/cdrtools-2.01_alpha37 *
3440/122
345</pre>
346
347<p>
348As you can see, I have more than one version of cdrtools installed. <c>qpkg</c>
349reports that many of the files from the older version have been changed since I
350installed it. Those packages were most likely modified when I updated from
351<path>cdrtools-2.01_alpha25</path> to <path>cdrtools-2.01_alpha37</path>. Note
352that the last two lines indicate that 0 of 122 files from <path>cdrtools-2.01
353_alpha37</path> have been changed since I installed. That is good. If any of
354them had been changed, I would be worried.
355</p>
356
357</body>
358</section>
359<section>
360<title>But Wait... There's More</title>
361<body>
362
363<p>
364<c>qpkg</c> can be used for other querying tasks that I will not cover here.
365There is a very complete man page for <c>qpkg</c>. Please read it for more
366information.
367</p>
368
369</body>
370</section>
371</chapter>
372
373<chapter>
374<title>equery</title>
375<section>
376<title>Introduction</title>
377<body>
378
379<p>
380<c>equery</c> is a tool that supports features that <c>qpkg</c> and <c>epm</c> 105<c>equery</c> is a tool that supports features that <c>epm</c> (and the
381have but has its own set of features that make it really useful. <c>equery 106deprecated <c>qpkg</c>) has but has its own set of features that make it
382--help</c> gives you the full set of options. <c>equery</c> will eventually 107really useful. <c>equery --help</c> gives you the full set of options.
383replace <c>etcat</c> at some point of time. 108<c>equery</c> will eventually replace <c>etcat</c> at some point of time.
384</p> 109</p>
385 110
386<note> 111<note>
387Not all features listed by <c>equery --help</c> have been implemented yet. 112Not all features listed by <c>equery --help</c> have been implemented yet.
388Those that have not been, are mentioned clearly. 113Those that have not been, are mentioned clearly.
389</note> 114</note>
390 115
391</body> 116</body>
392</section> 117</section>
393<section> 118<section>
394<title>Finding out Package Sizes</title> 119<title>Finding out Package Sizes</title>
395<body> 120<body>
396 121
397<p> 122<p>
398Ever been curious to find out how much space a specific package is occupying? 123Ever been curious to find out how much space a specific package is occupying?

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20